aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2009-09-24 19:23:17 -0400
committerTony Lindgren <tony@atomide.com>2009-09-24 19:23:17 -0400
commit44e74840d668d23b65e22772828e2600641b6ab0 (patch)
tree22d3be3fd651c5758f0d5f14029804df8e194f9f /arch/arm
parent4f5433324d1e29cf234d5b1b14782c0fc2948298 (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')
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c7
-rw-r--r--arch/arm/mach-omap2/mux.c2
-rw-r--r--arch/arm/plat-omap/include/mach/mux.h1
3 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 500c9956876..70df6b4dbcd 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[];
139static int beagle_twl_gpio_setup(struct device *dev, 139static 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
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 339ba80ee68..b5fac32aae7 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -460,6 +460,8 @@ MUX_CFG_34XX("AF26_34XX_GPIO0", 0x1e0,
460 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) 460 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
461MUX_CFG_34XX("AF22_34XX_GPIO9", 0xa18, 461MUX_CFG_34XX("AF22_34XX_GPIO9", 0xa18,
462 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) 462 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
463MUX_CFG_34XX("AG9_34XX_GPIO23", 0x5ee,
464 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
463MUX_CFG_34XX("AH8_34XX_GPIO29", 0x5fa, 465MUX_CFG_34XX("AH8_34XX_GPIO29", 0x5fa,
464 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) 466 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
465MUX_CFG_34XX("U8_34XX_GPIO54_OUT", 0x0b4, 467MUX_CFG_34XX("U8_34XX_GPIO54_OUT", 0x0b4,
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h
index 4bcf8a59d8c..0f49d2d563d 100644
--- a/arch/arm/plat-omap/include/mach/mux.h
+++ b/arch/arm/plat-omap/include/mach/mux.h
@@ -840,6 +840,7 @@ enum omap34xx_index {
840 */ 840 */
841 AF26_34XX_GPIO0, 841 AF26_34XX_GPIO0,
842 AF22_34XX_GPIO9, 842 AF22_34XX_GPIO9,
843 AG9_34XX_GPIO23,
843 AH8_34XX_GPIO29, 844 AH8_34XX_GPIO29,
844 U8_34XX_GPIO54_OUT, 845 U8_34XX_GPIO54_OUT,
845 U8_34XX_GPIO54_DOWN, 846 U8_34XX_GPIO54_DOWN,