Merge branch 'next/fixes-non-critical' into next/drivers
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 Mar 2012 22:42:24 +0000 (22:42 +0000)
committerArnd Bergmann <arnd@arndb.de>
Tue, 20 Mar 2012 22:42:24 +0000 (22:42 +0000)
Conflicts:
arch/arm/mach-lpc32xx/clock.c
arch/arm/mach-pxa/pxa25x.c
arch/arm/mach-pxa/pxa27x.c

The conflicts with pxa are non-obvious, we have multiple branches
adding and removing the same clock settings. According to
Haojian Zhuang, removing the sa1100 rtc dummy clock is the correct
fix here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 files changed:
1  2 
MAINTAINERS
arch/arm/Kconfig
arch/arm/configs/imx_v4_v5_defconfig
arch/arm/mach-exynos/mach-universal_c210.c
arch/arm/mach-imx/mm-imx3.c
arch/arm/mach-lpc32xx/clock.c
arch/arm/mach-lpc32xx/common.h
arch/arm/mach-lpc32xx/phy3250.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/sr_device.c
arch/arm/mach-pxa/pxa3xx.c
arch/arm/mach-pxa/pxa95x.c
arch/arm/mach-s3c2440/mach-gta02.c
arch/arm/mach-s3c2440/mach-rx1950.c
arch/arm/plat-samsung/devs.c
drivers/mmc/host/mmci.c
drivers/mmc/host/sdhci-esdhc-imx.c

diff --combined MAINTAINERS
@@@ -962,7 -962,7 +962,7 @@@ F: drivers/tty/serial/msm_serial.
  F:    drivers/platform/msm/
  F:    drivers/*/pm8???-*
  F:    include/linux/mfd/pm8xxx/
- T:    git git://codeaurora.org/quic/kernel/davidb/linux-msm.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git
  S:    Maintained
  
  ARM/TOSA MACHINE SUPPORT
@@@ -1310,7 -1310,7 +1310,7 @@@ F:      drivers/atm
  F:    include/linux/atm*
  
  ATMEL AT91 MCI DRIVER
- M:    Nicolas Ferre <nicolas.ferre@atmel.com>
+ M:    Ludovic Desroches <ludovic.desroches@atmel.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.atmel.com/products/AT91/
  W:    http://www.at91.com/
@@@ -1318,7 -1318,7 +1318,7 @@@ S:      Maintaine
  F:    drivers/mmc/host/at91_mci.c
  
  ATMEL AT91 / AT32 MCI DRIVER
- M:    Nicolas Ferre <nicolas.ferre@atmel.com>
+ M:    Ludovic Desroches <ludovic.desroches@atmel.com>
  S:    Maintained
  F:    drivers/mmc/host/atmel-mci.c
  F:    drivers/mmc/host/atmel-mci-regs.h
@@@ -3638,15 -3638,6 +3638,15 @@@ S:    Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
  F:    kernel/irq/
  
 +IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
 +M:    Benjamin Herrenschmidt <benh@kernel.crashing.org>
 +M:    Grant Likely <grant.likely@secretlab.ca>
 +T:    git git://git.secretlab.ca/git/linux-2.6.git irqdomain/next
 +S:    Maintained
 +F:    Documentation/IRQ-domain.txt
 +F:    include/linux/irqdomain.h
 +F:    kernel/irq/irqdomain.c
 +
  ISAPNP
  M:    Jaroslav Kysela <perex@perex.cz>
  S:    Maintained
diff --combined arch/arm/Kconfig
@@@ -324,7 -324,7 +324,7 @@@ config ARCH_AT9
        select CLKDEV_LOOKUP
        help
          This enables support for systems based on the Atmel AT91RM9200,
 -        AT91SAM9 and AT91CAP9 processors.
 +        AT91SAM9 processors.
  
  config ARCH_BCMRING
        bool "Broadcom BCMRING"
@@@ -754,7 -754,7 +754,7 @@@ config ARCH_SA110
        select ARCH_HAS_CPUFREQ
        select CPU_FREQ
        select GENERIC_CLOCKEVENTS
 -      select HAVE_CLK
 +      select CLKDEV_LOOKUP
        select HAVE_SCHED_CLOCK
        select TICK_ONESHOT
        select ARCH_REQUIRE_GPIOLIB
@@@ -901,6 -901,7 +901,7 @@@ config ARCH_U30
  
  config ARCH_U8500
        bool "ST-Ericsson U8500 Series"
+       depends on MMU
        select CPU_V7
        select ARM_AMBA
        select GENERIC_CLOCKEVENTS
@@@ -1280,7 -1281,7 +1281,7 @@@ config ARM_ERRATA_74362
        depends on CPU_V7
        help
          This option enables the workaround for the 743622 Cortex-A9
-         (r2p0..r2p2) erratum. Under very rare conditions, a faulty
+         (r2p*) erratum. Under very rare conditions, a faulty
          optimisation in the Cortex-A9 Store Buffer may lead to data
          corruption. This workaround sets a specific bit in the diagnostic
          register of the Cortex-A9 which disables the Store Buffer
@@@ -1577,7 -1578,7 +1578,7 @@@ config LOCAL_TIMER
  config ARCH_NR_GPIO
        int
        default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
-       default 350 if ARCH_U8500
+       default 355 if ARCH_U8500
        default 0
        help
          Maximum number of GPIOs in the system.
@@@ -45,7 -45,6 +45,7 @@@ CONFIG_FPE_NWFPE=
  CONFIG_FPE_NWFPE_XP=y
  CONFIG_PM_DEBUG=y
  CONFIG_NET=y
 +CONFIG_SMSC911X=y
  CONFIG_PACKET=y
  CONFIG_UNIX=y
  CONFIG_INET=y
@@@ -69,6 -68,7 +69,7 @@@ CONFIG_MTD_CFI=
  CONFIG_MTD_CFI_ADV_OPTIONS=y
  CONFIG_MTD_CFI_GEOMETRY=y
  # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
+ CONFIG_MTD_MAP_BANK_WIDTH_4=y
  # CONFIG_MTD_CFI_I2 is not set
  CONFIG_MTD_CFI_INTELEXT=y
  CONFIG_MTD_PHYSMAP=y
@@@ -79,8 -79,6 +80,8 @@@ CONFIG_MISC_DEVICES=
  CONFIG_EEPROM_AT24=y
  CONFIG_EEPROM_AT25=y
  CONFIG_NETDEVICES=y
 +CONFIG_CS89x0=y
 +CONFIG_CS89x0_PLATFORM=y
  CONFIG_DM9000=y
  CONFIG_SMC91X=y
  CONFIG_SMC911X=y
@@@ -118,21 -116,6 +119,21 @@@ CONFIG_FB_IMX=
  CONFIG_BACKLIGHT_LCD_SUPPORT=y
  CONFIG_LCD_CLASS_DEVICE=y
  CONFIG_BACKLIGHT_CLASS_DEVICE=y
 +CONFIG_LCD_L4F00242T03=y
 +CONFIG_MEDIA_SUPPORT=y
 +CONFIG_VIDEO_DEV=y
 +CONFIG_VIDEO_V4L2_COMMON=y
 +CONFIG_VIDEO_MEDIA=y
 +CONFIG_VIDEO_V4L2=y
 +CONFIG_VIDEOBUF_GEN=y
 +CONFIG_VIDEOBUF_DMA_CONTIG=y
 +CONFIG_VIDEOBUF2_CORE=y
 +CONFIG_VIDEO_CAPTURE_DRIVERS=y
 +CONFIG_V4L_PLATFORM_DRIVERS=y
 +CONFIG_SOC_CAMERA=y
 +CONFIG_SOC_CAMERA_OV2640=y
 +CONFIG_VIDEO_MX2_HOSTSUPPORT=y
 +CONFIG_VIDEO_MX2=y
  CONFIG_BACKLIGHT_PWM=y
  CONFIG_FRAMEBUFFER_CONSOLE=y
  CONFIG_FONTS=y
@@@ -13,6 -13,7 +13,7 @@@
  #include <linux/i2c.h>
  #include <linux/gpio_keys.h>
  #include <linux/gpio.h>
+ #include <linux/interrupt.h>
  #include <linux/fb.h>
  #include <linux/mfd/max8998.h>
  #include <linux/regulator/machine.h>
@@@ -595,6 -596,7 +596,7 @@@ static struct mxt_platform_data qt60224
        .threshold      = 0x28,
        .voltage        = 2800000,              /* 2.8V */
        .orient         = MXT_DIAGONAL,
+       .irqflags       = IRQF_TRIGGER_FALLING,
  };
  
  static struct i2c_board_info i2c3_devs[] __initdata = {
@@@ -741,7 -743,7 +743,7 @@@ static struct s3c_sdhci_platdata univer
  };
  
  static struct regulator_consumer_supply mmc0_supplies[] = {
 -      REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
 +      REGULATOR_SUPPLY("vmmc", "exynos4-sdhci.0"),
  };
  
  static struct regulator_init_data mmc0_fixed_voltage_init_data = {
@@@ -997,7 -999,7 +999,7 @@@ static void __init universal_map_io(voi
        s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
  }
  
 -void s5p_tv_setup(void)
 +static void s5p_tv_setup(void)
  {
        /* direct HPD to HDMI chip */
        gpio_request_one(EXYNOS4_GPX3(7), GPIOF_IN, "hpd-plug");
@@@ -34,29 -34,31 +34,29 @@@ static void imx3_idle(void
  {
        unsigned long reg = 0;
  
 -      if (!need_resched())
 -              __asm__ __volatile__(
 -                      /* disable I and D cache */
 -                      "mrc p15, 0, %0, c1, c0, 0\n"
 -                      "bic %0, %0, #0x00001000\n"
 -                      "bic %0, %0, #0x00000004\n"
 -                      "mcr p15, 0, %0, c1, c0, 0\n"
 -                      /* invalidate I cache */
 -                      "mov %0, #0\n"
 -                      "mcr p15, 0, %0, c7, c5, 0\n"
 -                      /* clear and invalidate D cache */
 -                      "mov %0, #0\n"
 -                      "mcr p15, 0, %0, c7, c14, 0\n"
 -                      /* WFI */
 -                      "mov %0, #0\n"
 -                      "mcr p15, 0, %0, c7, c0, 4\n"
 -                      "nop\n" "nop\n" "nop\n" "nop\n"
 -                      "nop\n" "nop\n" "nop\n"
 -                      /* enable I and D cache */
 -                      "mrc p15, 0, %0, c1, c0, 0\n"
 -                      "orr %0, %0, #0x00001000\n"
 -                      "orr %0, %0, #0x00000004\n"
 -                      "mcr p15, 0, %0, c1, c0, 0\n"
 -                      : "=r" (reg));
 -      local_irq_enable();
 +      __asm__ __volatile__(
 +              /* disable I and D cache */
 +              "mrc p15, 0, %0, c1, c0, 0\n"
 +              "bic %0, %0, #0x00001000\n"
 +              "bic %0, %0, #0x00000004\n"
 +              "mcr p15, 0, %0, c1, c0, 0\n"
 +              /* invalidate I cache */
 +              "mov %0, #0\n"
 +              "mcr p15, 0, %0, c7, c5, 0\n"
 +              /* clear and invalidate D cache */
 +              "mov %0, #0\n"
 +              "mcr p15, 0, %0, c7, c14, 0\n"
 +              /* WFI */
 +              "mov %0, #0\n"
 +              "mcr p15, 0, %0, c7, c0, 4\n"
 +              "nop\n" "nop\n" "nop\n" "nop\n"
 +              "nop\n" "nop\n" "nop\n"
 +              /* enable I and D cache */
 +              "mrc p15, 0, %0, c1, c0, 0\n"
 +              "orr %0, %0, #0x00001000\n"
 +              "orr %0, %0, #0x00000004\n"
 +              "mcr p15, 0, %0, c1, c0, 0\n"
 +              : "=r" (reg));
  }
  
  static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
@@@ -76,7 -78,7 +76,7 @@@
        return __arm_ioremap(phys_addr, size, mtype);
  }
  
- void imx3_init_l2x0(void)
+ void __init imx3_init_l2x0(void)
  {
        void __iomem *l2x0_base;
        void __iomem *clkctl_base;
@@@ -132,8 -134,8 +132,8 @@@ void __init imx31_init_early(void
  {
        mxc_set_cpu_type(MXC_CPU_MX31);
        mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
 -      pm_idle = imx3_idle;
        imx_ioremap = imx3_ioremap;
 +      arm_pm_idle = imx3_idle;
  }
  
  void __init mx31_init_irq(void)
@@@ -195,7 -197,7 +195,7 @@@ void __init imx35_init_early(void
        mxc_set_cpu_type(MXC_CPU_MX35);
        mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
        mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
 -      pm_idle = imx3_idle;
 +      arm_pm_idle = imx3_idle;
        imx_ioremap = imx3_ioremap;
  }
  
@@@ -82,6 -82,7 +82,7 @@@
   *   will also impact the individual peripheral rates.
   */
  
+ #include <linux/export.h>
  #include <linux/kernel.h>
  #include <linux/list.h>
  #include <linux/errno.h>
  #include "clock.h"
  #include "common.h"
  
+ static DEFINE_SPINLOCK(global_clkregs_lock);
  static struct clk clk_armpll;
  static struct clk clk_usbpll;
- static DEFINE_MUTEX(clkm_lock);
  
  /*
   * Post divider values for PLLs based on selected register value
@@@ -127,7 -129,7 +129,7 @@@ static struct clk osc_32KHz = 
  static int local_pll397_enable(struct clk *clk, int enable)
  {
        u32 reg;
-       unsigned long timeout = 1 + msecs_to_jiffies(10);
+       unsigned long timeout = jiffies + msecs_to_jiffies(10);
  
        reg = __raw_readl(LPC32XX_CLKPWR_PLL397_CTRL);
  
                /* Wait for PLL397 lock */
                while (((__raw_readl(LPC32XX_CLKPWR_PLL397_CTRL) &
                        LPC32XX_CLKPWR_SYSCTRL_PLL397_STS) == 0) &&
-                       (timeout > jiffies))
+                       time_before(jiffies, timeout))
                        cpu_relax();
  
                if ((__raw_readl(LPC32XX_CLKPWR_PLL397_CTRL) &
  static int local_oscmain_enable(struct clk *clk, int enable)
  {
        u32 reg;
-       unsigned long timeout = 1 + msecs_to_jiffies(10);
+       unsigned long timeout = jiffies + msecs_to_jiffies(10);
  
        reg = __raw_readl(LPC32XX_CLKPWR_MAIN_OSC_CTRL);
  
                /* Wait for main oscillator to start */
                while (((__raw_readl(LPC32XX_CLKPWR_MAIN_OSC_CTRL) &
                        LPC32XX_CLKPWR_MOSC_DISABLE) != 0) &&
-                       (timeout > jiffies))
+                       time_before(jiffies, timeout))
                        cpu_relax();
  
                if ((__raw_readl(LPC32XX_CLKPWR_MAIN_OSC_CTRL) &
@@@ -383,7 -385,7 +385,7 @@@ static int local_usbpll_enable(struct c
  {
        u32 reg;
        int ret = -ENODEV;
-       unsigned long timeout = 1 + msecs_to_jiffies(10);
+       unsigned long timeout = jiffies + msecs_to_jiffies(10);
  
        reg = __raw_readl(LPC32XX_CLKPWR_USB_CTRL);
  
                __raw_writel(reg, LPC32XX_CLKPWR_USB_CTRL);
  
                /* Wait for PLL lock */
-               while ((timeout > jiffies) & (ret == -ENODEV)) {
+               while (time_before(jiffies, timeout) && (ret == -ENODEV)) {
                        reg = __raw_readl(LPC32XX_CLKPWR_USB_CTRL);
                        if (reg & LPC32XX_CLKPWR_USBCTRL_PLL_STS)
                                ret = 0;
@@@ -719,41 -721,6 +721,41 @@@ static struct clk clk_tsc = 
        .get_rate       = local_return_parent_rate,
  };
  
 +static int adc_onoff_enable(struct clk *clk, int enable)
 +{
 +      u32 tmp;
 +      u32 divider;
 +
 +      /* Use PERIPH_CLOCK */
 +      tmp = __raw_readl(LPC32XX_CLKPWR_ADC_CLK_CTRL_1);
 +      tmp |= LPC32XX_CLKPWR_ADCCTRL1_PCLK_SEL;
 +      /*
 +       * Set clock divider so that we have equal to or less than
 +       * 4.5MHz clock at ADC
 +       */
 +      divider = clk->get_rate(clk) / 4500000 + 1;
 +      tmp |= divider;
 +      __raw_writel(tmp, LPC32XX_CLKPWR_ADC_CLK_CTRL_1);
 +
 +      /* synchronize rate of this clock w/ actual HW setting */
 +      clk->rate = clk->get_rate(clk->parent) / divider;
 +
 +      if (enable == 0)
 +              __raw_writel(0, clk->enable_reg);
 +      else
 +              __raw_writel(clk->enable_mask, clk->enable_reg);
 +
 +      return 0;
 +}
 +
 +static struct clk clk_adc = {
 +      .parent         = &clk_pclk,
 +      .enable         = adc_onoff_enable,
 +      .enable_reg     = LPC32XX_CLKPWR_ADC_CLK_CTRL,
 +      .enable_mask    = LPC32XX_CLKPWR_ADC32CLKCTRL_CLK_EN,
 +      .get_rate       = local_return_parent_rate,
 +};
 +
  static int mmc_onoff_enable(struct clk *clk, int enable)
  {
        u32 tmp;
@@@ -926,20 -893,8 +928,8 @@@ static struct clk clk_lcd = 
        .enable_mask    = LPC32XX_CLKPWR_LCDCTRL_CLK_EN,
  };
  
- static inline void clk_lock(void)
- {
-       mutex_lock(&clkm_lock);
- }
- static inline void clk_unlock(void)
- {
-       mutex_unlock(&clkm_lock);
- }
  static void local_clk_disable(struct clk *clk)
  {
-       WARN_ON(clk->usecount == 0);
        /* Don't attempt to disable clock if it has no users */
        if (clk->usecount > 0) {
                clk->usecount--;
@@@ -982,10 -937,11 +972,11 @@@ static int local_clk_enable(struct clk 
  int clk_enable(struct clk *clk)
  {
        int ret;
+       unsigned long flags;
  
-       clk_lock();
+       spin_lock_irqsave(&global_clkregs_lock, flags);
        ret = local_clk_enable(clk);
-       clk_unlock();
+       spin_unlock_irqrestore(&global_clkregs_lock, flags);
  
        return ret;
  }
@@@ -996,9 -952,11 +987,11 @@@ EXPORT_SYMBOL(clk_enable)
   */
  void clk_disable(struct clk *clk)
  {
-       clk_lock();
+       unsigned long flags;
+       spin_lock_irqsave(&global_clkregs_lock, flags);
        local_clk_disable(clk);
-       clk_unlock();
+       spin_unlock_irqrestore(&global_clkregs_lock, flags);
  }
  EXPORT_SYMBOL(clk_disable);
  
   */
  unsigned long clk_get_rate(struct clk *clk)
  {
-       unsigned long rate;
-       clk_lock();
-       rate = clk->get_rate(clk);
-       clk_unlock();
-       return rate;
+       return clk->get_rate(clk);
  }
  EXPORT_SYMBOL(clk_get_rate);
  
@@@ -1029,11 -981,8 +1016,8 @@@ int clk_set_rate(struct clk *clk, unsig
         * the actual rate set as part of the peripheral dividers
         * instead of high level clock control
         */
-       if (clk->set_rate) {
-               clk_lock();
+       if (clk->set_rate)
                ret = clk->set_rate(clk, rate);
-               clk_unlock();
-       }
  
        return ret;
  }
@@@ -1044,15 -993,11 +1028,11 @@@ EXPORT_SYMBOL(clk_set_rate)
   */
  long clk_round_rate(struct clk *clk, unsigned long rate)
  {
-       clk_lock();
        if (clk->round_rate)
                rate = clk->round_rate(clk, rate);
        else
                rate = clk->get_rate(clk);
  
-       clk_unlock();
        return rate;
  }
  EXPORT_SYMBOL(clk_round_rate);
@@@ -1110,11 -1055,10 +1090,11 @@@ static struct clk_lookup lookups[] = 
        _REGISTER_CLOCK("dev:ssp1", NULL, clk_ssp1)
        _REGISTER_CLOCK("lpc32xx_keys.0", NULL, clk_kscan)
        _REGISTER_CLOCK("lpc32xx-nand.0", "nand_ck", clk_nand)
-       _REGISTER_CLOCK("tbd", "i2s0_ck", clk_i2s0)
-       _REGISTER_CLOCK("tbd", "i2s1_ck", clk_i2s1)
 +      _REGISTER_CLOCK("lpc32xx-adc", NULL, clk_adc)
+       _REGISTER_CLOCK(NULL, "i2s0_ck", clk_i2s0)
+       _REGISTER_CLOCK(NULL, "i2s1_ck", clk_i2s1)
        _REGISTER_CLOCK("ts-lpc32xx", NULL, clk_tsc)
-       _REGISTER_CLOCK("dev:mmc0", "MCLK", clk_mmc)
+       _REGISTER_CLOCK("dev:mmc0", NULL, clk_mmc)
        _REGISTER_CLOCK("lpc-net.0", NULL, clk_net)
        _REGISTER_CLOCK("dev:clcd", NULL, clk_lcd)
        _REGISTER_CLOCK("lpc32xx_udc", "ck_usbd", clk_usbd)
@@@ -29,7 -29,6 +29,7 @@@ extern struct platform_device lpc32xx_i
  extern struct platform_device lpc32xx_i2c1_device;
  extern struct platform_device lpc32xx_i2c2_device;
  extern struct platform_device lpc32xx_tsc_device;
 +extern struct platform_device lpc32xx_adc_device;
  extern struct platform_device lpc32xx_rtc_device;
  
  /*
@@@ -66,7 -65,6 +66,6 @@@ extern u32 clk_get_pclk_div(void)
   */
  extern void lpc32xx_get_uid(u32 devid[4]);
  
- extern void lpc32xx_watchdog_reset(void);
  extern u32 lpc32xx_return_iram_size(void);
  
  /*
@@@ -149,8 -149,20 +149,8 @@@ static struct clcd_board lpc32xx_clcd_d
        .remove         = lpc32xx_clcd_remove,
  };
  
 -static struct amba_device lpc32xx_clcd_device = {
 -      .dev                            = {
 -              .coherent_dma_mask      = ~0,
 -              .init_name              = "dev:clcd",
 -              .platform_data          = &lpc32xx_clcd_data,
 -      },
 -      .res                            = {
 -              .start                  = LPC32XX_LCD_BASE,
 -              .end                    = (LPC32XX_LCD_BASE + SZ_4K - 1),
 -              .flags                  = IORESOURCE_MEM,
 -      },
 -      .dma_mask                       = ~0,
 -      .irq                            = {IRQ_LPC32XX_LCD, NO_IRQ},
 -};
 +static AMBA_AHB_DEVICE(lpc32xx_clcd, "dev:clcd", 0,
 +      LPC32XX_LCD_BASE, { IRQ_LPC32XX_LCD }, &lpc32xx_clcd_data);
  
  /*
   * AMBA SSP (SPI)
@@@ -179,8 -191,20 +179,8 @@@ static struct pl022_ssp_controller lpc3
        .enable_dma             = 0,
  };
  
 -static struct amba_device lpc32xx_ssp0_device = {
 -      .dev                            = {
 -              .coherent_dma_mask      = ~0,
 -              .init_name              = "dev:ssp0",
 -              .platform_data          = &lpc32xx_ssp0_data,
 -      },
 -      .res                            = {
 -              .start                  = LPC32XX_SSP0_BASE,
 -              .end                    = (LPC32XX_SSP0_BASE + SZ_4K - 1),
 -              .flags                  = IORESOURCE_MEM,
 -      },
 -      .dma_mask                       = ~0,
 -      .irq                            = {IRQ_LPC32XX_SSP0, NO_IRQ},
 -};
 +static AMBA_APB_DEVICE(lpc32xx_ssp0, "dev:ssp0", 0,
 +      LPC32XX_SSP0_BASE, { IRQ_LPC32XX_SSP0 }, &lpc32xx_ssp0_data);
  
  /* AT25 driver registration */
  static int __init phy3250_spi_board_register(void)
@@@ -247,12 -271,13 +247,14 @@@ static struct platform_device lpc32xx_g
  };
  
  static struct platform_device *phy3250_devs[] __initdata = {
+       &lpc32xx_rtc_device,
+       &lpc32xx_tsc_device,
        &lpc32xx_i2c0_device,
        &lpc32xx_i2c1_device,
        &lpc32xx_i2c2_device,
        &lpc32xx_watchdog_device,
        &lpc32xx_gpio_led_device,
 +      &lpc32xx_adc_device,
  };
  
  static struct amba_device *amba_devs[] __initdata = {
  #include <plat/mcspi.h>
  #include <plat/mcbsp.h>
  #include <plat/mmc.h>
- #include <plat/i2c.h>
  #include <plat/dmtimer.h>
  #include <plat/common.h>
  
  #include "omap_hwmod_common_data.h"
  
 +#include "smartreflex.h"
  #include "cm1_44xx.h"
  #include "cm2_44xx.h"
  #include "prm44xx.h"
@@@ -3964,10 -3962,6 +3963,10 @@@ static struct omap_hwmod_class omap44xx
  };
  
  /* smartreflex_core */
 +static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
 +      .sensor_voltdm_name   = "core",
 +};
 +
  static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
  static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
        { .irq = 19 + OMAP44XX_IRQ_GIC_START },
@@@ -4004,6 -3998,7 +4003,6 @@@ static struct omap_hwmod omap44xx_smart
        .mpu_irqs       = omap44xx_smartreflex_core_irqs,
  
        .main_clk       = "smartreflex_core_fck",
 -      .vdd_name       = "core",
        .prcm = {
                .omap4 = {
                        .clkctrl_offs = OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET,
        },
        .slaves         = omap44xx_smartreflex_core_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
 +      .dev_attr       = &smartreflex_core_dev_attr,
  };
  
  /* smartreflex_iva */
 +static struct omap_smartreflex_dev_attr smartreflex_iva_dev_attr = {
 +      .sensor_voltdm_name     = "iva",
 +};
 +
  static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
  static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
        { .irq = 102 + OMAP44XX_IRQ_GIC_START },
@@@ -4056,6 -4046,7 +4055,6 @@@ static struct omap_hwmod omap44xx_smart
        .clkdm_name     = "l4_ao_clkdm",
        .mpu_irqs       = omap44xx_smartreflex_iva_irqs,
        .main_clk       = "smartreflex_iva_fck",
 -      .vdd_name       = "iva",
        .prcm = {
                .omap4 = {
                        .clkctrl_offs = OMAP4_CM_ALWON_SR_IVA_CLKCTRL_OFFSET,
        },
        .slaves         = omap44xx_smartreflex_iva_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves),
 +      .dev_attr       = &smartreflex_iva_dev_attr,
  };
  
  /* smartreflex_mpu */
 +static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
 +      .sensor_voltdm_name     = "mpu",
 +};
 +
  static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
  static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
        { .irq = 18 + OMAP44XX_IRQ_GIC_START },
@@@ -4108,6 -4094,7 +4107,6 @@@ static struct omap_hwmod omap44xx_smart
        .clkdm_name     = "l4_ao_clkdm",
        .mpu_irqs       = omap44xx_smartreflex_mpu_irqs,
        .main_clk       = "smartreflex_mpu_fck",
 -      .vdd_name       = "mpu",
        .prcm = {
                .omap4 = {
                        .clkctrl_offs = OMAP4_CM_ALWON_SR_MPU_CLKCTRL_OFFSET,
        },
        .slaves         = omap44xx_smartreflex_mpu_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves),
 +      .dev_attr       = &smartreflex_mpu_dev_attr,
  };
  
  /*
@@@ -69,12 -69,11 +69,12 @@@ static void __init sr_set_nvalues(struc
        sr_data->nvalue_count = count;
  }
  
- static int sr_dev_init(struct omap_hwmod *oh, void *user)
+ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
  {
        struct omap_sr_data *sr_data;
        struct platform_device *pdev;
        struct omap_volt_data *volt_data;
 +      struct omap_smartreflex_dev_attr *sr_dev_attr;
        char *name = "smartreflex";
        static int i;
  
                return -ENOMEM;
        }
  
 -      if (!oh->vdd_name) {
 +      sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr;
 +      if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) {
                pr_err("%s: No voltage domain specified for %s."
 -                      "Cannot initialize\n", __func__, oh->name);
 +                              "Cannot initialize\n", __func__,
 +                                      oh->name);
                goto exit;
        }
  
        sr_data->senn_mod = 0x1;
        sr_data->senp_mod = 0x1;
  
 -      sr_data->voltdm = voltdm_lookup(oh->vdd_name);
 +      sr_data->voltdm = voltdm_lookup(sr_dev_attr->sensor_voltdm_name);
        if (IS_ERR(sr_data->voltdm)) {
                pr_err("%s: Unable to get voltage domain pointer for VDD %s\n",
 -                      __func__, oh->vdd_name);
 +                      __func__, sr_dev_attr->sensor_voltdm_name);
                goto exit;
        }
  
@@@ -89,7 -89,6 +89,7 @@@ static struct clk_lookup pxa3xx_clkregs
        INIT_CLKREG(&clk_pxa3xx_mmc2, "pxa2xx-mci.1", NULL),
        INIT_CLKREG(&clk_pxa3xx_smemc, "pxa2xx-pcmcia", NULL),
        INIT_CLKREG(&clk_pxa3xx_gpio, "pxa-gpio", NULL),
 +      INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL),
  };
  
  #ifdef CONFIG_PM
@@@ -463,7 -462,6 +463,6 @@@ static int __init pxa3xx_init(void
  
                register_syscore_ops(&pxa_irq_syscore_ops);
                register_syscore_ops(&pxa3xx_mfp_syscore_ops);
-               register_syscore_ops(&pxa_gpio_syscore_ops);
                register_syscore_ops(&pxa3xx_clock_syscore_ops);
  
                ret = platform_add_devices(devices, ARRAY_SIZE(devices));
@@@ -231,7 -231,6 +231,7 @@@ static struct clk_lookup pxa95x_clkregs
        INIT_CLKREG(&clk_pxa95x_pwm0, "pxa27x-pwm.0", NULL),
        INIT_CLKREG(&clk_pxa95x_pwm1, "pxa27x-pwm.1", NULL),
        INIT_CLKREG(&clk_pxa95x_gpio, "pxa-gpio", NULL),
 +      INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL),
  };
  
  void __init pxa95x_init_irq(void)
@@@ -284,7 -283,6 +284,6 @@@ static int __init pxa95x_init(void
                        return ret;
  
                register_syscore_ops(&pxa_irq_syscore_ops);
-               register_syscore_ops(&pxa_gpio_syscore_ops);
                register_syscore_ops(&pxa3xx_clock_syscore_ops);
  
                ret = platform_add_devices(devices, ARRAY_SIZE(devices));
@@@ -258,7 -258,7 +258,7 @@@ static struct pcf50633_bl_platform_dat
        .ramp_time = 5,
  };
  
 -struct pcf50633_platform_data gta02_pcf_pdata = {
 +static struct pcf50633_platform_data gta02_pcf_pdata = {
        .resumers = {
                [0] =   PCF50633_INT1_USBINS |
                        PCF50633_INT1_USBREM |
@@@ -404,7 -404,7 +404,7 @@@ static struct platform_device gta02_nor
  };
  
  
 -struct platform_device s3c24xx_pwm_device = {
 +static struct platform_device s3c24xx_pwm_device = {
        .name           = "s3c24xx_pwm",
        .num_resources  = 0,
  };
@@@ -601,5 -601,5 +601,5 @@@ MACHINE_START(NEO1973_GTA02, "GTA02"
        .init_irq       = s3c24xx_init_irq,
        .init_machine   = gta02_machine_init,
        .timer          = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
  MACHINE_END
@@@ -217,7 -217,7 +217,7 @@@ static const struct s3c_adc_bat_thresh 
        { .volt = 3820, .cur = 0, .level = 0},
  };
  
 -int rx1950_bat_init(void)
 +static int rx1950_bat_init(void)
  {
        int ret;
  
@@@ -236,25 -236,25 +236,25 @@@ err_gpio1
        return ret;
  }
  
 -void rx1950_bat_exit(void)
 +static void rx1950_bat_exit(void)
  {
        gpio_free(S3C2410_GPJ(2));
        gpio_free(S3C2410_GPJ(3));
  }
  
 -void rx1950_enable_charger(void)
 +static void rx1950_enable_charger(void)
  {
        gpio_direction_output(S3C2410_GPJ(2), 1);
        gpio_direction_output(S3C2410_GPJ(3), 1);
  }
  
 -void rx1950_disable_charger(void)
 +static void rx1950_disable_charger(void)
  {
        gpio_direction_output(S3C2410_GPJ(2), 0);
        gpio_direction_output(S3C2410_GPJ(3), 0);
  }
  
 -DEFINE_SPINLOCK(rx1950_blink_spin);
 +static DEFINE_SPINLOCK(rx1950_blink_spin);
  
  static int rx1950_led_blink_set(unsigned gpio, int state,
        unsigned long *delay_on, unsigned long *delay_off)
@@@ -382,7 -382,7 +382,7 @@@ static struct s3c2410fb_mach_info rx195
  
  static struct pwm_device *lcd_pwm;
  
 -void rx1950_lcd_power(int enable)
 +static void rx1950_lcd_power(int enable)
  {
        int i;
        static int enabled;
@@@ -822,5 -822,5 +822,5 @@@ MACHINE_START(RX1950, "HP iPAQ RX1950"
        .init_irq = s3c24xx_init_irq,
        .init_machine = rx1950_init_machine,
        .timer = &s3c24xx_timer,
-       .restart        = s3c2440_restart,
+       .restart        = s3c244x_restart,
  MACHINE_END
@@@ -744,6 -744,17 +744,6 @@@ struct platform_device s3c_device_iis 
  };
  #endif /* CONFIG_PLAT_S3C24XX */
  
 -#ifdef CONFIG_CPU_S3C2440
 -struct platform_device s3c2412_device_iis = {
 -      .name           = "s3c2412-iis",
 -      .id             = -1,
 -      .dev            = {
 -              .dma_mask               = &samsung_device_dma_mask,
 -              .coherent_dma_mask      = DMA_BIT_MASK(32),
 -      }
 -};
 -#endif /* CONFIG_CPU_S3C2440 */
 -
  /* IDE CFCON */
  
  #ifdef CONFIG_SAMSUNG_DEV_IDE
@@@ -1067,7 -1078,7 +1067,7 @@@ static struct resource s5p_pmu_resource
        DEFINE_RES_IRQ(IRQ_PMU)
  };
  
 -struct platform_device s5p_device_pmu = {
 +static struct platform_device s5p_device_pmu = {
        .name           = "arm-pmu",
        .id             = ARM_PMU_DEVICE_CPU,
        .num_resources  = ARRAY_SIZE(s5p_pmu_resource),
@@@ -1398,7 -1409,7 +1398,7 @@@ void __init s5p_ehci_set_platdata(struc
  
  #ifdef CONFIG_S3C_DEV_USB_HSOTG
  static struct resource s3c_usb_hsotg_resources[] = {
-       [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_16K),
+       [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_128K),
        [1] = DEFINE_RES_IRQ(IRQ_OTG),
  };
  
diff --combined drivers/mmc/host/mmci.c
@@@ -1271,12 -1271,13 +1271,13 @@@ static int __devinit mmci_probe(struct 
        /*
         * Block size can be up to 2048 bytes, but must be a power of two.
         */
-       mmc->max_blk_size = 2048;
+       mmc->max_blk_size = 1 << 11;
  
        /*
-        * No limit on the number of blocks transferred.
+        * Limit the number of blocks transferred so that we don't overflow
+        * the maximum request size.
         */
-       mmc->max_blk_count = mmc->max_req_size;
+       mmc->max_blk_count = mmc->max_req_size >> 11;
  
        spin_lock_init(&host->lock);
  
        if (ret)
                goto unmap;
  
 -      if (dev->irq[1] == NO_IRQ)
 +      if (dev->irq[1] == NO_IRQ || !dev->irq[1])
                host->singleirq = true;
        else {
                ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED,
@@@ -269,8 -269,9 +269,9 @@@ static void esdhc_writew_le(struct sdhc
                imx_data->scratchpad = val;
                return;
        case SDHCI_COMMAND:
-               if ((host->cmd->opcode == MMC_STOP_TRANSMISSION)
-                       && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))
+               if ((host->cmd->opcode == MMC_STOP_TRANSMISSION ||
+                    host->cmd->opcode == MMC_SET_BLOCK_COUNT) &&
+                   (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))
                        val |= SDHCI_CMD_ABORTCMD;
  
                if (is_imx6q_usdhc(imx_data)) {
@@@ -463,7 -464,7 +464,7 @@@ static int __devinit sdhci_esdhc_imx_pr
                err = PTR_ERR(clk);
                goto err_clk_get;
        }
 -      clk_enable(clk);
 +      clk_prepare_enable(clk);
        pltfm_host->clk = clk;
  
        if (!is_imx25_esdhc(imx_data))
@@@ -558,7 -559,7 +559,7 @@@ no_card_detect_irq
                gpio_free(boarddata->wp_gpio);
  no_card_detect_pin:
  no_board_data:
 -      clk_disable(pltfm_host->clk);
 +      clk_disable_unprepare(pltfm_host->clk);
        clk_put(pltfm_host->clk);
  err_clk_get:
        kfree(imx_data);
@@@ -585,7 -586,7 +586,7 @@@ static int __devexit sdhci_esdhc_imx_re
                gpio_free(boarddata->cd_gpio);
        }
  
 -      clk_disable(pltfm_host->clk);
 +      clk_disable_unprepare(pltfm_host->clk);
        clk_put(pltfm_host->clk);
        kfree(imx_data);