aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-06-21 10:41:51 -0400
committerShawn Guo <shawn.guo@linaro.org>2011-07-26 21:31:14 -0400
commit913413c307c919f8b21edccea23a9fd9d9d49a64 (patch)
treef36a4cf7e1f2111d4bdf14253476d115b5110f1f /arch/arm/mach-imx
parentca2cc333920690db87a03c2ee3bd6f43adb3e7fb (diff)
mmc: sdhci-esdhc-imx: extend card_detect and write_protect support for mx5
The patch extends card_detect and write_protect support to get mx5 family and more scenarios supported. The changes include: * Turn platform_data from optional to mandatory * Add cd_types and wp_types into platform_data to cover more use cases * Remove the use of flag ESDHC_FLAG_GPIO_FOR_CD * Adjust some machine codes to adopt the platform_data changes * Work around the issue that software reset will get card detection circuit stop working With this patch, card_detect and write_protect gets supported on mx5 based platforms. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Chris Ball <cjb@laptop.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Arnaud Patard <arnaud.patard@rtp-net.org> Acked-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c3
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c3
-rw-r--r--arch/arm/mach-imx/mach-mx25_3ds.c2
-rw-r--r--arch/arm/mach-imx/mach-pcm043.c2
4 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
index 01ebcb31e48..66e8726253f 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
@@ -225,7 +225,8 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = {
225 225
226static struct esdhc_platform_data sd1_pdata = { 226static struct esdhc_platform_data sd1_pdata = {
227 .cd_gpio = GPIO_SD1CD, 227 .cd_gpio = GPIO_SD1CD,
228 .wp_gpio = -EINVAL, 228 .cd_type = ESDHC_CD_GPIO,
229 .wp_type = ESDHC_WP_NONE,
229}; 230};
230 231
231/* 232/*
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
index 558eb526ba5..0f0af02b318 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
@@ -236,7 +236,8 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = {
236 236
237static struct esdhc_platform_data sd1_pdata = { 237static struct esdhc_platform_data sd1_pdata = {
238 .cd_gpio = GPIO_SD1CD, 238 .cd_gpio = GPIO_SD1CD,
239 .wp_gpio = -EINVAL, 239 .cd_type = ESDHC_CD_GPIO,
240 .wp_type = ESDHC_WP_NONE,
240}; 241};
241 242
242/* 243/*
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
index 01534bb6130..7f66a91df36 100644
--- a/arch/arm/mach-imx/mach-mx25_3ds.c
+++ b/arch/arm/mach-imx/mach-mx25_3ds.c
@@ -215,6 +215,8 @@ static const struct imxi2c_platform_data mx25_3ds_i2c0_data __initconst = {
215static const struct esdhc_platform_data mx25pdk_esdhc_pdata __initconst = { 215static const struct esdhc_platform_data mx25pdk_esdhc_pdata __initconst = {
216 .wp_gpio = SD1_GPIO_WP, 216 .wp_gpio = SD1_GPIO_WP,
217 .cd_gpio = SD1_GPIO_CD, 217 .cd_gpio = SD1_GPIO_CD,
218 .wp_type = ESDHC_WP_GPIO,
219 .cd_type = ESDHC_CD_GPIO,
218}; 220};
219 221
220static void __init mx25pdk_init(void) 222static void __init mx25pdk_init(void)
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index 163cc318caf..660ec3e80cf 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -349,6 +349,8 @@ __setup("otg_mode=", pcm043_otg_mode);
349static struct esdhc_platform_data sd1_pdata = { 349static struct esdhc_platform_data sd1_pdata = {
350 .wp_gpio = SD1_GPIO_WP, 350 .wp_gpio = SD1_GPIO_WP,
351 .cd_gpio = SD1_GPIO_CD, 351 .cd_gpio = SD1_GPIO_CD,
352 .wp_type = ESDHC_WP_GPIO,
353 .cd_type = ESDHC_CD_GPIO,
352}; 354};
353 355
354/* 356/*