diff options
author | Thomas Weber <weber@corscience.de> | 2011-11-17 16:39:40 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-12-09 15:32:53 -0500 |
commit | a15164f13fb3f0f70849c2a099ff0af7b2924ba1 (patch) | |
tree | 25f7c9f110f0dc115a41dc03fc8ba45a5e16e1ed /arch/arm/mach-omap2/hsmmc.c | |
parent | e62245ba1caaf78d6fe2619266939c8e7caa150c (diff) |
ARM: OMAP: hsmmc: Add support for non-OMAP pins
The Devkit8000 uses a TWL4030 pin for card detection.
Thats why the error:
_omap_mux_init_gpio: Could not set gpio192
occurs.
This patch checks that the pin is on OMAP before
calling omap_mux_init_gpio.
Signed-off-by: Thomas Weber <weber@corscience.de>
[tony@atomide.com: updated comments]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/hsmmc.c')
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 59830d0eeb55..997b33d76418 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -214,10 +214,12 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on, | |||
214 | static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, | 214 | static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, |
215 | int controller_nr) | 215 | int controller_nr) |
216 | { | 216 | { |
217 | if (gpio_is_valid(mmc_controller->slots[0].switch_pin)) | 217 | if (gpio_is_valid(mmc_controller->slots[0].switch_pin) && |
218 | (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) | ||
218 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, | 219 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, |
219 | OMAP_PIN_INPUT_PULLUP); | 220 | OMAP_PIN_INPUT_PULLUP); |
220 | if (gpio_is_valid(mmc_controller->slots[0].gpio_wp)) | 221 | if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) && |
222 | (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) | ||
221 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, | 223 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, |
222 | OMAP_PIN_INPUT_PULLUP); | 224 | OMAP_PIN_INPUT_PULLUP); |
223 | if (cpu_is_omap34xx()) { | 225 | if (cpu_is_omap34xx()) { |