From a96eb148c74a09bc872b1490141d98811a3c7dbd Mon Sep 17 00:00:00 2001 From: "Arnaud Patard (Rtp)" Date: Wed, 27 Oct 2010 14:40:49 +0200 Subject: [PATCH] efikamx: add mmc support The efika mx is using a esdhc host for mmc support. Now that the sdhci has support for it, enable it. Signed-off-by: Arnaud Patard Signed-off-by: Sascha Hauer --- arch/arm/mach-mx5/Kconfig | 1 + arch/arm/mach-mx5/board-mx51_efikamx.c | 27 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 95cb0a831478..0345abe79e29 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig @@ -81,6 +81,7 @@ endchoice config MACH_MX51_EFIKAMX bool "Support MX51 Genesi Efika MX nettop" + select IMX_HAVE_PLATFORM_ESDHC select IMX_HAVE_PLATFORM_IMX_UART help Include support for Genesi Efika MX nettop. This includes specific diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c index 057f9f437359..842d6bff6e06 100644 --- a/arch/arm/mach-mx5/board-mx51_efikamx.c +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c @@ -58,6 +58,28 @@ static iomux_v3_cfg_t mx51efikamx_pads[] = { MX51_PAD_PCBID0, MX51_PAD_PCBID1, MX51_PAD_PCBID2, + + /* SD 1 */ + MX51_PAD_SD1_CMD__SD1_CMD, + MX51_PAD_SD1_CLK__SD1_CLK, + MX51_PAD_SD1_DATA0__SD1_DATA0, + MX51_PAD_SD1_DATA1__SD1_DATA1, + MX51_PAD_SD1_DATA2__SD1_DATA2, + MX51_PAD_SD1_DATA3__SD1_DATA3, + + /* SD 2 */ + MX51_PAD_SD2_CMD__SD2_CMD, + MX51_PAD_SD2_CLK__SD2_CLK, + MX51_PAD_SD2_DATA0__SD2_DATA0, + MX51_PAD_SD2_DATA1__SD2_DATA1, + MX51_PAD_SD2_DATA2__SD2_DATA2, + MX51_PAD_SD2_DATA3__SD2_DATA3, + + /* SD/MMC WP/CD */ + MX51_PAD_GPIO_1_0__ESDHC1_CD, + MX51_PAD_GPIO_1_1__ESDHC1_WP, + MX51_PAD_GPIO_1_7__ESDHC2_WP, + MX51_PAD_GPIO_1_8__ESDHC2_CD, }; /* Serial ports */ @@ -163,6 +185,11 @@ static void __init mxc_board_init(void) mx51_efikamx_board_id(); mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); mxc_init_imx_uart(); + imx51_add_esdhc(0, NULL); + + /* on < 1.2 boards both SD controllers are used */ + if (system_rev < 0x12) + imx51_add_esdhc(1, NULL); } static void __init mx51_efikamx_timer_init(void)