Merge branch 'next/soc-exynos5250-gpio' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Thu, 15 Mar 2012 20:50:16 +0000 (20:50 +0000)]
* 'next/soc-exynos5250-gpio' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (201 commits)
  gpio/samsung: use ioremap() for EXYNOS4 GPIOlib
  gpio/samsung: add support GPIOlib for EXYNOS5250
  ARM: EXYNOS: add support GPIO for EXYNOS5250
(update to v3.3-rc7)

Conflicts:
arch/arm/mach-pxa/pxa25x.c
arch/arm/mach-pxa/pxa27x.c

The dummy clock for the pxa rtc in those files keeps getting added and
removed in various trees. Apparently removing is the correct solution.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

12 files changed:
1  2 
MAINTAINERS
arch/arm/Kconfig
arch/arm/mach-exynos/common.c
arch/arm/mach-exynos/include/mach/map.h
arch/arm/mach-exynos/mach-universal_c210.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
@@@ -1280,7 -1280,7 +1280,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
@@@ -156,21 -156,6 +156,6 @@@ static struct map_desc exynos4_iodesc[
                .length         = SZ_4K,
                .type           = MT_DEVICE,
        }, {
-               .virtual        = (unsigned long)S5P_VA_GPIO1,
-               .pfn            = __phys_to_pfn(EXYNOS4_PA_GPIO1),
-               .length         = SZ_4K,
-               .type           = MT_DEVICE,
-       }, {
-               .virtual        = (unsigned long)S5P_VA_GPIO2,
-               .pfn            = __phys_to_pfn(EXYNOS4_PA_GPIO2),
-               .length         = SZ_4K,
-               .type           = MT_DEVICE,
-       }, {
-               .virtual        = (unsigned long)S5P_VA_GPIO3,
-               .pfn            = __phys_to_pfn(EXYNOS4_PA_GPIO3),
-               .length         = SZ_256,
-               .type           = MT_DEVICE,
-       }, {
                .virtual        = (unsigned long)S5P_VA_DMC0,
                .pfn            = __phys_to_pfn(EXYNOS4_PA_DMC0),
                .length         = SZ_4K,
@@@ -201,6 -186,14 +186,6 @@@ static struct map_desc exynos4_iodesc1[
        },
  };
  
 -static void exynos_idle(void)
 -{
 -      if (!need_resched())
 -              cpu_do_idle();
 -
 -      local_irq_enable();
 -}
 -
  void exynos4_restart(char mode, const char *cmd)
  {
        __raw_writel(0x1, S5P_SWRESET);
@@@ -394,7 -387,7 +379,7 @@@ void __init exynos4_init_irq(void
        gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000;
  
        if (!of_have_populated_dt())
 -              gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset);
 +              gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset, NULL);
  #ifdef CONFIG_OF
        else
                of_irq_init(exynos4_dt_irq_match);
@@@ -459,6 -452,10 +444,6 @@@ early_initcall(exynos4_l2x0_cache_init)
  int __init exynos_init(void)
  {
        printk(KERN_INFO "EXYNOS: Initializing architecture\n");
 -
 -      /* set idle function */
 -      pm_idle = exynos_idle;
 -
        return device_register(&exynos4_dev);
  }
  
@@@ -661,7 -658,7 +646,7 @@@ static void exynos4_irq_eint0_15(unsign
        chained_irq_exit(chip, desc);
  }
  
 -int __init exynos4_init_irq_eint(void)
 +static int __init exynos4_init_irq_eint(void)
  {
        int irq;
  
@@@ -67,8 -67,7 +67,8 @@@
  #define EXYNOS4_PA_TWD                        0x10500600
  #define EXYNOS4_PA_L2CC                       0x10502000
  
 -#define EXYNOS4_PA_MDMA                       0x10810000
 +#define EXYNOS4_PA_MDMA0              0x10810000
 +#define EXYNOS4_PA_MDMA1              0x12840000
  #define EXYNOS4_PA_PDMA0              0x12680000
  #define EXYNOS4_PA_PDMA1              0x12690000
  
  #define EXYNOS4_PA_GPIO1              0x11400000
  #define EXYNOS4_PA_GPIO2              0x11000000
  #define EXYNOS4_PA_GPIO3              0x03860000
+ #define EXYNOS5_PA_GPIO1              0x11400000
+ #define EXYNOS5_PA_GPIO2              0x13400000
+ #define EXYNOS5_PA_GPIO3              0x10D10000
+ #define EXYNOS5_PA_GPIO4              0x03860000
  
  #define EXYNOS4_PA_MIPI_CSIS0         0x11880000
  #define EXYNOS4_PA_MIPI_CSIS1         0x11890000
@@@ -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 = {
@@@ -969,6 -971,7 +971,6 @@@ static struct platform_device *universa
        &s3c_device_i2c5,
        &s5p_device_i2c_hdmiphy,
        &hdmi_fixed_voltage,
 -      &exynos4_device_pd[PD_TV],
        &s5p_device_hdmi,
        &s5p_device_sdo,
        &s5p_device_mixer,
        &s5p_device_mfc,
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
 -      &exynos4_device_pd[PD_MFC],
 -      &exynos4_device_pd[PD_LCD0],
 -      &exynos4_device_pd[PD_CAM],
        &cam_i_core_fixed_reg_dev,
        &cam_s_if_fixed_reg_dev,
        &s5p_device_fimc_md,
@@@ -993,12 -999,16 +995,12 @@@ 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");
        s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3));
        s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE);
 -
 -      /* setup dependencies between TV devices */
 -      s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev;
 -      s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev;
  }
  
  static void __init universal_reserve(void)
@@@ -1032,6 -1042,15 +1034,6 @@@ static void __init universal_machine_in
  
        /* Last */
        platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices));
 -
 -      s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
 -      s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
 -
 -      s5p_device_fimc0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
 -      s5p_device_fimc1.dev.parent = &exynos4_device_pd[PD_CAM].dev;
 -      s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM].dev;
 -      s5p_device_fimc3.dev.parent = &exynos4_device_pd[PD_CAM].dev;
 -      s5p_device_mipi_csis0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
  }
  
  MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
@@@ -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);