Commit ed8303fc authored by stanley.miao's avatar stanley.miao Committed by Tony Lindgren

omap: init the gpio pinmux for mmc

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: default avatarStanley.Miao <stanley.miao@windriver.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent ea221a6a
...@@ -591,6 +591,15 @@ static inline void omap_hsmmc_reset(void) {} ...@@ -591,6 +591,15 @@ static inline void omap_hsmmc_reset(void) {}
static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
int controller_nr) 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) { if (cpu_is_omap2420() && controller_nr == 0) {
omap_cfg_reg(H18_24XX_MMC_CMD); omap_cfg_reg(H18_24XX_MMC_CMD);
omap_cfg_reg(H15_24XX_MMC_CLKI); omap_cfg_reg(H15_24XX_MMC_CLKI);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment