From: Richard Zhu Date: Mon, 18 Apr 2011 06:53:56 +0000 (+0800) Subject: ENGR00142266-3 eSDHC:Add the GPIO CD/WP on MX51 BBG boards X-Git-Tag: v3.0.35-fsl~2394 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1f0346cdbb5c85d506ed7c06c6f21392930cc056;p=karo-tx-linux.git ENGR00142266-3 eSDHC:Add the GPIO CD/WP on MX51 BBG boards arm: enable the eSDHC CD/WP on MX51 BBG board Signed-off-by: Richard Zhu --- diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 2f02333e0abe..59df3278b0b6 100755 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c @@ -42,6 +42,10 @@ #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 MX51_BBG_SD1_CD IMX_GPIO_NR(1, 0) +#define MX51_BBG_SD1_WP IMX_GPIO_NR(1, 1) +#define MX51_BBG_SD2_CD IMX_GPIO_NR(1, 6) +#define MX51_BBG_SD2_WP IMX_GPIO_NR(1, 5) /* USB_CTRL_1 */ #define MX51_USB_CTRL_1_OFFSET 0x10 @@ -133,6 +137,10 @@ static iomux_v3_cfg_t mx51babbage_pads[] = { /* FEC PHY reset line */ MX51_PAD_EIM_A20__GPIO2_14, + MX51_PAD_GPIO1_0__GPIO1_0, + MX51_PAD_GPIO1_1__GPIO1_1, + MX51_PAD_GPIO1_5__GPIO1_5, + MX51_PAD_GPIO1_6__GPIO1_6, /* SD 1 */ MX51_PAD_SD1_CMD__SD1_CMD, MX51_PAD_SD1_CLK__SD1_CLK, @@ -170,6 +178,16 @@ static struct imxi2c_platform_data babbage_hsi2c_data = { .bitrate = 400000, }; +static const struct esdhc_platform_data mx51_bbg_sd1_data __initconst = { + .wp_gpio = MX51_BBG_SD1_WP, + .cd_gpio = MX51_BBG_SD1_CD, +}; + +static const struct esdhc_platform_data mx51_bbg_sd2_data __initconst = { + .wp_gpio = MX51_BBG_SD2_WP, + .cd_gpio = MX51_BBG_SD2_CD, +}; + static void babbage_suspend_enter() { } @@ -446,8 +464,8 @@ static void __init mx51_babbage_init(void) mxc_iomux_v3_setup_pad(usbh1stp); babbage_usbhub_reset(); - imx51_add_sdhci_esdhc_imx(0, NULL); - imx51_add_sdhci_esdhc_imx(1, NULL); + imx51_add_sdhci_esdhc_imx(0, &mx51_bbg_sd1_data); + imx51_add_sdhci_esdhc_imx(1, &mx51_bbg_sd2_data); spi_register_board_info(mx51_babbage_spi_board_info, ARRAY_SIZE(mx51_babbage_spi_board_info));