aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/include/mach/esdhc.h
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/plat-mxc/include/mach/esdhc.h
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/plat-mxc/include/mach/esdhc.h')
-rw-r--r--arch/arm/plat-mxc/include/mach/esdhc.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/arch/arm/plat-mxc/include/mach/esdhc.h b/arch/arm/plat-mxc/include/mach/esdhc.h
index 86003f411755..aaf97481f413 100644
--- a/arch/arm/plat-mxc/include/mach/esdhc.h
+++ b/arch/arm/plat-mxc/include/mach/esdhc.h
@@ -10,17 +10,34 @@
10#ifndef __ASM_ARCH_IMX_ESDHC_H 10#ifndef __ASM_ARCH_IMX_ESDHC_H
11#define __ASM_ARCH_IMX_ESDHC_H 11#define __ASM_ARCH_IMX_ESDHC_H
12 12
13enum wp_types {
14 ESDHC_WP_NONE, /* no WP, neither controller nor gpio */
15 ESDHC_WP_CONTROLLER, /* mmc controller internal WP */
16 ESDHC_WP_GPIO, /* external gpio pin for WP */
17};
18
19enum cd_types {
20 ESDHC_CD_NONE, /* no CD, neither controller nor gpio */
21 ESDHC_CD_CONTROLLER, /* mmc controller internal CD */
22 ESDHC_CD_GPIO, /* external gpio pin for CD */
23 ESDHC_CD_PERMANENT, /* no CD, card permanently wired to host */
24};
25
13/** 26/**
14 * struct esdhc_platform_data - optional platform data for esdhc on i.MX 27 * struct esdhc_platform_data - platform data for esdhc on i.MX
15 * 28 *
16 * strongly recommended for i.MX25/35, not needed for other variants 29 * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35.
17 * 30 *
18 * @wp_gpio: gpio for write_protect (-EINVAL if unused) 31 * @wp_gpio: gpio for write_protect
19 * @cd_gpio: gpio for card_detect interrupt (-EINVAL if unused) 32 * @cd_gpio: gpio for card_detect interrupt
33 * @wp_type: type of write_protect method (see wp_types enum above)
34 * @cd_type: type of card_detect method (see cd_types enum above)
20 */ 35 */
21 36
22struct esdhc_platform_data { 37struct esdhc_platform_data {
23 unsigned int wp_gpio; 38 unsigned int wp_gpio;
24 unsigned int cd_gpio; 39 unsigned int cd_gpio;
40 enum wp_types wp_type;
41 enum cd_types cd_type;
25}; 42};
26#endif /* __ASM_ARCH_IMX_ESDHC_H */ 43#endif /* __ASM_ARCH_IMX_ESDHC_H */