summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
authorstanley.miao2010-05-13 14:39:30 +0200
committerTony Lindgren2010-05-20 20:17:51 +0200
commited8303fc111e58530e22bd29b0d7e08dced75999 (patch)
tree92f86f768e337d784bc4be590e19543c1d454f8c /arch/arm/mach-omap2/devices.c
parentomap: DMA: Fix multi-line comments (diff)
downloadkernel-qcow2-linux-ed8303fc111e58530e22bd29b0d7e08dced75999.tar.gz
kernel-qcow2-linux-ed8303fc111e58530e22bd29b0d7e08dced75999.tar.xz
kernel-qcow2-linux-ed8303fc111e58530e22bd29b0d7e08dced75999.zip
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: Stanley.Miao <stanley.miao@windriver.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 10f3a3c58cc0..3d30f22c4c88 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -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);