Merge branch 'fixes-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
authorArnd Bergmann <arnd@arndb.de>
Mon, 11 Jul 2011 21:53:01 +0000 (23:53 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 11 Jul 2011 21:53:01 +0000 (23:53 +0200)
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-zoom-debugboard.c
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/hsmmc.c
arch/arm/mach-omap2/iommu2.c
arch/arm/mach-omap2/omap-iommu.c
arch/arm/plat-omap/dmtimer.c
arch/arm/plat-omap/iovmm.c

index 35891d4..f074921 100644 (file)
@@ -1,8 +1,9 @@
 /*
  * board-cm-t35.c (CompuLab CM-T35 module)
  *
- * Copyright (C) 2009 CompuLab, Ltd.
- * Author: Mike Rapoport <mike@compulab.co.il>
+ * Copyright (C) 2009-2011 CompuLab, Ltd.
+ * Authors: Mike Rapoport <mike@compulab.co.il>
+ *         Igor Grinberg <grinberg@compulab.co.il>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- *
  */
 
 #include <linux/kernel.h>
@@ -149,12 +145,12 @@ static struct mtd_partition cm_t35_nand_partitions[] = {
        },
        {
                .name           = "linux",
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x280000 */
+               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x2A0000 */
                .size           = 32 * NAND_BLOCK_SIZE,
        },
        {
                .name           = "rootfs",
-               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x680000 */
+               .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x6A0000 */
                .size           = MTDPART_SIZ_FULL,
        },
 };
@@ -433,9 +429,9 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
        if (gpio_request_one(wlan_rst, GPIOF_OUT_INIT_HIGH, "WLAN RST") == 0) {
                gpio_export(wlan_rst, 0);
                udelay(10);
-               gpio_set_value(wlan_rst, 0);
+               gpio_set_value_cansleep(wlan_rst, 0);
                udelay(10);
-               gpio_set_value(wlan_rst, 1);
+               gpio_set_value_cansleep(wlan_rst, 1);
        } else {
                pr_err("CM-T35: could not obtain gpio for WiFi reset\n");
        }
index f1f18d0..f949a99 100644 (file)
@@ -519,7 +519,6 @@ static void __init overo_init(void)
        usb_musb_init(NULL);
        usbhs_init(&usbhs_bdata);
        overo_spi_init();
-       overo_ads7846_init();
        overo_init_smsc911x();
        overo_display_init();
        overo_init_led();
index 6402e78..369c2eb 100644 (file)
@@ -23,6 +23,7 @@
 #define ZOOM_SMSC911X_GPIO     158
 #define ZOOM_QUADUART_CS       3
 #define ZOOM_QUADUART_GPIO     102
+#define ZOOM_QUADUART_RST_GPIO 152
 #define QUART_CLK              1843200
 #define DEBUG_BASE             0x08000000
 #define ZOOM_ETHR_START        DEBUG_BASE
@@ -67,6 +68,14 @@ static inline void __init zoom_init_quaduart(void)
        unsigned long cs_mem_base;
        int quart_gpio = 0;
 
+       if (gpio_request_one(ZOOM_QUADUART_RST_GPIO,
+                               GPIOF_OUT_INIT_LOW,
+                               "TL16CP754C GPIO") < 0) {
+               pr_err("Failed to request GPIO%d for TL16CP754C\n",
+                       ZOOM_QUADUART_RST_GPIO);
+               return;
+       }
+
        quart_cs = ZOOM_QUADUART_CS;
 
        if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) {
index 180299e..bf9c36c 100644 (file)
@@ -453,6 +453,7 @@ int __init omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name)
        if (IS_ERR_VALUE(r)) {
                WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n",
                     mpurate_ck->name, mpurate, r);
+               clk_put(mpurate_ck);
                return -EINVAL;
        }
 
index 66868c5..a9b45c7 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/delay.h>
+#include <linux/gpio.h>
 #include <mach/hardware.h>
 #include <plat/mmc.h>
 #include <plat/omap-pm.h>
@@ -213,12 +214,10 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
 static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
                        int controller_nr)
 {
-       if ((mmc_controller->slots[0].switch_pin > 0) && \
-               (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
+       if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
                omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
                                        OMAP_PIN_INPUT_PULLUP);
-       if ((mmc_controller->slots[0].gpio_wp > 0) && \
-               (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
+       if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
                omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
                                        OMAP_PIN_INPUT_PULLUP);
        if (cpu_is_omap34xx()) {
index adb083e..f286012 100644 (file)
@@ -225,8 +225,8 @@ static u32 omap2_get_pte_attr(struct iotlb_entry *e)
        attr = e->mixed << 5;
        attr |= e->endian;
        attr |= e->elsz >> 3;
-       attr <<= ((e->pgsz & MMU_CAM_PGSZ_4K) ? 0 : 6);
-
+       attr <<= (((e->pgsz == MMU_CAM_PGSZ_4K) ||
+                       (e->pgsz == MMU_CAM_PGSZ_64K)) ? 0 : 6);
        return attr;
 }
 
index 3fc5dc7..e61fead 100644 (file)
@@ -67,7 +67,7 @@ static struct iommu_device omap4_devices[] = {
                .pdata = {
                        .name = "ducati",
                        .nr_tlb_entries = 32,
-                       .clk_name = "ducati_ick",
+                       .clk_name = "ipu_fck",
                        .da_start = 0x0,
                        .da_end = 0xFFFFF000,
                },
index 8dfb818..75a847d 100644 (file)
@@ -209,8 +209,8 @@ static void omap_dm_timer_reset(struct omap_dm_timer *timer)
        }
        omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
 
-       /* Enable autoidle on OMAP2 / OMAP3 */
-       if (cpu_is_omap24xx() || cpu_is_omap34xx())
+       /* Enable autoidle on OMAP2+ */
+       if (cpu_class_is_omap2())
                autoidle = 1;
 
        /*
index 83a37c5..c60737c 100644 (file)
@@ -72,7 +72,7 @@ static size_t sgtable_len(const struct sg_table *sgt)
        for_each_sg(sgt->sgl, sg, sgt->nents, i) {
                size_t bytes;
 
-               bytes = sg_dma_len(sg);
+               bytes = sg->length;
 
                if (!iopgsz_ok(bytes)) {
                        pr_err("%s: sg[%d] not iommu pagesize(%x)\n",
@@ -198,7 +198,7 @@ static void *vmap_sg(const struct sg_table *sgt)
                int err;
 
                pa = sg_phys(sg);
-               bytes = sg_dma_len(sg);
+               bytes = sg->length;
 
                BUG_ON(bytes != PAGE_SIZE);
 
@@ -476,7 +476,7 @@ static int map_iovm_area(struct iommu *obj, struct iovm_struct *new,
                struct iotlb_entry e;
 
                pa = sg_phys(sg);
-               bytes = sg_dma_len(sg);
+               bytes = sg->length;
 
                flags &= ~IOVMF_PGSZ_MASK;
                pgsz = bytes_to_iopgsz(bytes);