Due to the issue reported with ESDHC_CD_CONTROLLER mode as below, GPIO mode becomes the best choice for card detection before the issue gets addressed.
http://article.gmane.org/gmane.linux.ports.arm.kernel/120790
Signed-off-by: Shawn Guo shawn.guo@linaro.org --- Actually the issue has been fixed with the v3 of the patch set as below, but it's still the safest to use gpio mode for card detection to let the monthly release go independently, since the fixing has not got enough feedback yet.
http://thread.gmane.org/gmane.linux.ports.arm.kernel/121081
arch/arm/mach-mx5/board-mx51_babbage.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 6e6de47..ad693ec 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c @@ -41,6 +41,8 @@ #define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21) #define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24) #define BABBAGE_ECSPI1_CS1 IMX_GPIO_NR(4, 25) +#define BABBAGE_SD1_CD IMX_GPIO_NR(1, 0) +#define BABBAGE_SD1_WP IMX_GPIO_NR(1, 1) #define BABBAGE_SD2_CD IMX_GPIO_NR(1, 6) #define BABBAGE_SD2_WP IMX_GPIO_NR(1, 5)
@@ -141,9 +143,9 @@ static iomux_v3_cfg_t mx51babbage_pads[] = { MX51_PAD_SD1_DATA1__SD1_DATA1, MX51_PAD_SD1_DATA2__SD1_DATA2, MX51_PAD_SD1_DATA3__SD1_DATA3, - /* CD/WP from controller */ - MX51_PAD_GPIO1_0__SD1_CD, - MX51_PAD_GPIO1_1__SD1_WP, + /* CD/WP gpio */ + MX51_PAD_GPIO1_0__GPIO1_0, + MX51_PAD_GPIO1_1__GPIO1_1,
/* SD 2 */ MX51_PAD_SD2_CMD__SD2_CMD, @@ -340,8 +342,10 @@ static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = { };
static const struct esdhc_platform_data mx51_babbage_sd1_data __initconst = { - .cd_type = ESDHC_CD_CONTROLLER, - .wp_type = ESDHC_WP_CONTROLLER, + .cd_gpio = BABBAGE_SD1_CD, + .wp_gpio = BABBAGE_SD1_WP, + .cd_type = ESDHC_CD_GPIO, + .wp_type = ESDHC_WP_GPIO, };
static const struct esdhc_platform_data mx51_babbage_sd2_data __initconst = {