omap: init the gpio pinmux for mmc
authorstanley.miao <stanley.miao@windriver.com>
Thu, 13 May 2010 12:39:30 +0000 (12:39 +0000)
committerTony Lindgren <tony@atomide.com>
Thu, 20 May 2010 18:17:51 +0000 (11:17 -0700)
There is two gpio for mmc use, one is for card detecting, another is
used for checking write protect. Intialize its pinmux in case the bootloader
doesn't set it.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/devices.c

index 10f3a3c58cc0f2f284b59ba131d827244b4ae3e6..3d30f22c4c8802a1ebfad174554ffbf5fb29f27f 100644 (file)
@@ -591,6 +591,15 @@ static inline void omap_hsmmc_reset(void) {}
 static inline void omap2_mmc_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))
+               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))
+               omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
+                                       OMAP_PIN_INPUT_PULLUP);
+
        if (cpu_is_omap2420() && controller_nr == 0) {
                omap_cfg_reg(H18_24XX_MMC_CMD);
                omap_cfg_reg(H15_24XX_MMC_CLKI);
This page took 0.035564 seconds and 5 git commands to generate.