From c255f3282f77a588bf23a1e70c285e7a1bdde4d0 Mon Sep 17 00:00:00 2001 From: Richard Zhu Date: Mon, 18 Apr 2011 14:53:16 +0800 Subject: [PATCH] ENGR00142266-4 eSDHC:Add the GPIO CD/WP on MX53 LOCO boards arm: enable the eSDHC CD/WP on MX53 LOCO board Signed-off-by: Richard Zhu --- arch/arm/mach-mx5/board-mx53_loco.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c index c2fdd4200014..a08ab7496fa7 100755 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c @@ -55,6 +55,9 @@ #define MX53_LOCO_UI2 IMX_GPIO_NR(2, 15) #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) #define LOCO_USBH1_VBUS IMX_GPIO_NR(7, 8) +#define MX53_LOCO_SD1_CD IMX_GPIO_NR(3, 13) +#define MX53_LOCO_SD3_CD IMX_GPIO_NR(3, 11) +#define MX53_LOCO_SD3_WP IMX_GPIO_NR(3, 12) extern void __iomem *arm_plat_base; extern void __iomem *gpc_base; @@ -94,6 +97,8 @@ static iomux_v3_cfg_t mx53_loco_pads[] = { MX53_PAD_SD1_DATA1__ESDHC1_DAT1, MX53_PAD_SD1_DATA2__ESDHC1_DAT2, MX53_PAD_SD1_DATA3__ESDHC1_DAT3, + /* SD1_CD */ + MX53_PAD_EIM_DA13__GPIO3_13, /* SD3 */ MX53_PAD_PATA_DATA8__ESDHC3_DAT0, MX53_PAD_PATA_DATA9__ESDHC3_DAT1, @@ -383,6 +388,15 @@ static struct mxc_bus_freq_platform_data loco_bus_freq_data = { .lp_reg_id = "DA9052_BUCK_PRO", }; +static const struct esdhc_platform_data mx53_loco_sd1_data __initconst = { + .cd_gpio = MX53_LOCO_SD1_CD, +}; + +static const struct esdhc_platform_data mx53_loco_sd3_data __initconst = { + .cd_gpio = MX53_LOCO_SD3_CD, + .wp_gpio = MX53_LOCO_SD3_WP, +}; + static void mx53_loco_usbh1_vbus(bool on) { if (on) @@ -730,8 +744,8 @@ static void __init mx53_loco_board_init(void) i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); - imx53_add_sdhci_esdhc_imx(0, NULL); - imx53_add_sdhci_esdhc_imx(2, NULL); + imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); + imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); imx53_add_ahci_imx(0, &sata_data); imx53_add_iim(&iim_data); -- 2.39.5