diff options
author | Jarkko Nikula <jhnikula@gmail.com> | 2009-09-24 19:23:17 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-09-24 19:23:17 -0400 |
commit | 44e74840d668d23b65e22772828e2600641b6ab0 (patch) | |
tree | 22d3be3fd651c5758f0d5f14029804df8e194f9f /arch/arm/mach-omap2/board-omap3beagle.c | |
parent | 4f5433324d1e29cf234d5b1b14782c0fc2948298 (diff) |
omap: Fix MMC gpio_wp for BeagleBoard C2 and above
Earlier BeagleBoards were using pad AH8 muxed to GPIO29 for MMC write-protect.
However, this signal has been changed to pad AG9 in board revision C2.
Fix this by adding mux configuration for pad AG9, runtime check for board
revisions and set the gpio number and pad muxing accordingly.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3beagle.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 500c9956876d..70df6b4dbcd4 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -139,8 +139,13 @@ static struct gpio_led gpio_leds[]; | |||
139 | static int beagle_twl_gpio_setup(struct device *dev, | 139 | static int beagle_twl_gpio_setup(struct device *dev, |
140 | unsigned gpio, unsigned ngpio) | 140 | unsigned gpio, unsigned ngpio) |
141 | { | 141 | { |
142 | if (system_rev >= 0x20 && system_rev <= 0x34301000) { | ||
143 | omap_cfg_reg(AG9_34XX_GPIO23); | ||
144 | mmc[0].gpio_wp = 23; | ||
145 | } else { | ||
146 | omap_cfg_reg(AH8_34XX_GPIO29); | ||
147 | } | ||
142 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 148 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
143 | omap_cfg_reg(AH8_34XX_GPIO29); | ||
144 | mmc[0].gpio_cd = gpio + 0; | 149 | mmc[0].gpio_cd = gpio + 0; |
145 | twl4030_mmc_init(mmc); | 150 | twl4030_mmc_init(mmc); |
146 | 151 | ||