aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-cm-t35.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-02-20 12:43:29 -0500
committerTony Lindgren <tony@atomide.com>2012-02-20 13:00:39 -0500
commit3b972bf06c22f5abfa6586a8baf50321cd825965 (patch)
tree666fd47675069dae78337f648670a550c4f9f85b /arch/arm/mach-omap2/board-cm-t35.c
parent993e4fbd7822cdf874fcf9f1b054a323d67ccf97 (diff)
ARM: OMAP2+: Split omap2_hsmmc_init() to properly support I2C GPIO pins
Otherwise omap_device_build() and omap_mux related functions can't be marked as __init when twl is build as a module. If a board is using GPIO pins or regulators configured by an external chip, such as TWL PMIC on I2C bus, the board must mark those MMC controllers as deferred. Additionally both omap_hsmmc_init() and omap_hsmmc_late_init() must be called by the board. For MMC controllers using internal GPIO pins for card detect and regulators the slots don't need to be marked deferred. In this case calling omap_hsmmc_init() is sufficient. Only mark the MMC slots using gpio_cd or gpio_wd as deferred as noted by Igor Grinberg <grinberg@compulab.co.il>. Note that this patch does not change the behaviour for board-4430sdp.c board-omap4panda.c. These boards wrongly rely on the omap_hsmmc.c init function callback to configure the PMIC GPIO interrupt lines on external chip. If the PMIC interrupt lines are not configured during init, they will fail. Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-cm-t35.c')
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index d73316ed4207..49e64057cb67 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -413,7 +413,7 @@ static struct omap2_hsmmc_info mmc[] = {
413 .caps = MMC_CAP_4_BIT_DATA, 413 .caps = MMC_CAP_4_BIT_DATA,
414 .gpio_cd = -EINVAL, 414 .gpio_cd = -EINVAL,
415 .gpio_wp = -EINVAL, 415 .gpio_wp = -EINVAL,
416 416 .deferred = true,
417 }, 417 },
418 { 418 {
419 .mmc = 2, 419 .mmc = 2,
@@ -471,7 +471,7 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
471 471
472 /* gpio + 0 is "mmc0_cd" (input/IRQ) */ 472 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
473 mmc[0].gpio_cd = gpio + 0; 473 mmc[0].gpio_cd = gpio + 0;
474 omap2_hsmmc_init(mmc); 474 omap_hsmmc_late_init(mmc);
475 475
476 return 0; 476 return 0;
477} 477}
@@ -639,6 +639,7 @@ static void __init cm_t3x_common_init(void)
639 omap_serial_init(); 639 omap_serial_init();
640 omap_sdrc_init(mt46h32m32lf6_sdrc_params, 640 omap_sdrc_init(mt46h32m32lf6_sdrc_params,
641 mt46h32m32lf6_sdrc_params); 641 mt46h32m32lf6_sdrc_params);
642 omap_hsmmc_init(mmc);
642 cm_t35_init_i2c(); 643 cm_t35_init_i2c();
643 omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL); 644 omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL);
644 cm_t35_init_ethernet(); 645 cm_t35_init_ethernet();