diff options
author | Shawn Guo <shawn.guo@freescale.com> | 2011-02-26 10:19:04 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-05-19 07:11:05 -0400 |
commit | 9c97f66271a09dedfe26a145fceb74c6efd83571 (patch) | |
tree | 7d8789429a82b5a674ec94bf37b52b0314212d3a | |
parent | 6f9ec442a07701e0ef241854862fdf2540be1bdb (diff) |
ARM: mach-imx: mx25_3ds: add write-protect and card-detect for SD
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
LAKML-Reference: 1298733544-24659-1-git-send-email-shawn.guo@freescale.com
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
[ukl: fixup conflict with ff86452 (ARM: mx25_3ds: Add I2C support) and
drop #inclusion of <mach/esdhc.h>]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-imx/mach-mx25_3ds.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c index 06da438282aa..378f4334378c 100644 --- a/arch/arm/mach-imx/mach-mx25_3ds.c +++ b/arch/arm/mach-imx/mach-mx25_3ds.c | |||
@@ -103,6 +103,8 @@ static iomux_v3_cfg_t mx25pdk_pads[] = { | |||
103 | MX25_PAD_SD1_DATA1__SD1_DATA1, | 103 | MX25_PAD_SD1_DATA1__SD1_DATA1, |
104 | MX25_PAD_SD1_DATA2__SD1_DATA2, | 104 | MX25_PAD_SD1_DATA2__SD1_DATA2, |
105 | MX25_PAD_SD1_DATA3__SD1_DATA3, | 105 | MX25_PAD_SD1_DATA3__SD1_DATA3, |
106 | MX25_PAD_A14__GPIO_2_0, /* WriteProtect */ | ||
107 | MX25_PAD_A15__GPIO_2_1, /* CardDetect */ | ||
106 | 108 | ||
107 | /* I2C1 */ | 109 | /* I2C1 */ |
108 | MX25_PAD_I2C1_CLK__I2C1_CLK, | 110 | MX25_PAD_I2C1_CLK__I2C1_CLK, |
@@ -208,6 +210,14 @@ static const struct imxi2c_platform_data mx25_3ds_i2c0_data __initconst = { | |||
208 | .bitrate = 100000, | 210 | .bitrate = 100000, |
209 | }; | 211 | }; |
210 | 212 | ||
213 | #define SD1_GPIO_WP IMX_GPIO_NR(2, 0) | ||
214 | #define SD1_GPIO_CD IMX_GPIO_NR(2, 1) | ||
215 | |||
216 | static const struct esdhc_platform_data mx25pdk_esdhc_pdata __initconst = { | ||
217 | .wp_gpio = SD1_GPIO_WP, | ||
218 | .cd_gpio = SD1_GPIO_CD, | ||
219 | }; | ||
220 | |||
211 | static void __init mx25pdk_init(void) | 221 | static void __init mx25pdk_init(void) |
212 | { | 222 | { |
213 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, | 223 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, |
@@ -225,7 +235,7 @@ static void __init mx25pdk_init(void) | |||
225 | imx25_add_fec(&mx25_fec_pdata); | 235 | imx25_add_fec(&mx25_fec_pdata); |
226 | imx25_add_imx_keypad(&mx25pdk_keymap_data); | 236 | imx25_add_imx_keypad(&mx25pdk_keymap_data); |
227 | 237 | ||
228 | imx25_add_sdhci_esdhc_imx(0, NULL); | 238 | imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata); |
229 | imx25_add_imx_i2c0(&mx25_3ds_i2c0_data); | 239 | imx25_add_imx_i2c0(&mx25_3ds_i2c0_data); |
230 | } | 240 | } |
231 | 241 | ||