[PATCH 2/3] i.MX27: Add support for SDHC1,3

Alexander Shiyan shc_work at mail.ru
Tue Mar 20 04:54:25 EDT 2012


imx27_add_mmc0 really registered SDHC2. Fix this by adding a
imx27_add_mmc1 and use this in the pca100 board file. Also add
imx27_add_mmc2 helper for register SDHC3.

Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
 arch/arm/boards/phycard-i.MX27/pca100.c        |    2 +-
 arch/arm/mach-imx/include/mach/devices-imx27.h |   10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/phycard-i.MX27/pca100.c b/arch/arm/boards/phycard-i.MX27/pca100.c
index 1b43951..f934a9b 100644
--- a/arch/arm/boards/phycard-i.MX27/pca100.c
+++ b/arch/arm/boards/phycard-i.MX27/pca100.c
@@ -292,7 +292,7 @@ static int pca100_devices_init(void)
 
 	imx27_add_nand(&nand_info);
 	imx27_add_fec(&fec_info);
-	imx27_add_mmc0(NULL);
+	imx27_add_mmc1(NULL);
 	imx27_add_fb(&pca100_fb_data);
 
 	PCCR1 |= PCCR1_PERCLK2_EN;
diff --git a/arch/arm/mach-imx/include/mach/devices-imx27.h b/arch/arm/mach-imx/include/mach/devices-imx27.h
index 3141d96..faf8ddc 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx27.h
+++ b/arch/arm/mach-imx/include/mach/devices-imx27.h
@@ -58,7 +58,15 @@ static inline struct device_d *imx27_add_fec(struct fec_platform_data *pdata)
 
 static inline struct device_d *imx27_add_mmc0(void *pdata)
 {
-	return imx_add_mmc((void *)0x10014000, 0, pdata);
+	return imx_add_mmc((void *)IMX_SDHC1_BASE, 0, pdata);
 }
 
+static inline struct device_d *imx27_add_mmc1(void *pdata)
+{
+	return imx_add_mmc((void *)IMX_SDHC2_BASE, 1, pdata);
+}
 
+static inline struct device_d *imx27_add_mmc2(void *pdata)
+{
+	return imx_add_mmc((void *)IMX_SDHC3_BASE, 2, pdata);
+}
-- 
1.7.3.4




More information about the barebox mailing list