Skip to contentSkip to conversation

i.MX27: Add support for SDHC1

PATCH Applied Alexander Shiyan 2 participants 6 messages Mar 18, 2012 – Mar 20, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 i.MX27: Add support for SDHC1

---
 arch/arm/boards/phycard-i.MX27/pca100.c        |    2 +-
 arch/arm/mach-imx/include/mach/devices-imx27.h |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
arch/arm/boards/phycard-i.MX27/pca100.c +1 -1
index 1b43951..f934a9b 100644
@@ -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;
arch/arm/mach-imx/include/mach/devices-imx27.h +5 -2
index 3141d96..4d30200 100644
@@ -58,7 +58,10 @@ 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);
+}
Signature · 7 lines
1.7.3.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer
#1 lore raw
Quoted 2 lines · Alexander Shiyan

This deserves a bit more explanation, like:

imx27_add_mmc0 really registered IMX_SDHC2. Fix this by adding a imx27_add_mmc1 and use this in the pca100 board file.

Sascha

Quoted 44 lines
---
 arch/arm/boards/phycard-i.MX27/pca100.c        |    2 +-
 arch/arm/mach-imx/include/mach/devices-imx27.h |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
arch/arm/boards/phycard-i.MX27/pca100.c +1 -1
index 1b43951..f934a9b 100644
@@ -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;
arch/arm/mach-imx/include/mach/devices-imx27.h +5 -2
index 3141d96..4d30200 100644
@@ -58,7 +58,10 @@ 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);
+}
Signature · 7 lines
1.7.3.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 1/3 i.MX27: Define base address for SDHC1,2,3

---
 arch/arm/mach-imx/include/mach/imx27-regs.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-imx/include/mach/imx27-regs.h +3 -0
index 3a4325e..b7bebae 100644
@@ -19,12 +19,15 @@
 #define IMX_SPI1_BASE              (0x0e000 + IMX_IO_BASE)
 #define IMX_SPI2_BASE              (0x0f000 + IMX_IO_BASE)
 #define IMX_I2C1_BASE              (0x12000 + IMX_IO_BASE)
+#define IMX_SDHC1_BASE             (0x13000 + IMX_IO_BASE)
+#define IMX_SDHC2_BASE             (0x14000 + IMX_IO_BASE)
 #define IMX_GPIO_BASE              (0x15000 + IMX_IO_BASE)
 #define IMX_TIM4_BASE              (0x19000 + IMX_IO_BASE)
 #define IMX_TIM5_BASE              (0x1a000 + IMX_IO_BASE)
 #define IMX_UART5_BASE             (0x1b000 + IMX_IO_BASE)
 #define IMX_UART6_BASE             (0x1c000 + IMX_IO_BASE)
 #define IMX_I2C2_BASE              (0x1d000 + IMX_IO_BASE)
+#define IMX_SDHC3_BASE             (0x1e000 + IMX_IO_BASE)
 #define IMX_TIM6_BASE              (0x1f000 + IMX_IO_BASE)
 #define IMX_AIPI2_BASE             (0x20000 + IMX_IO_BASE)
 #define IMX_FB_BASE                (0x21000 + IMX_IO_BASE)
Signature · 7 lines
1.7.3.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer Applied
#3 lore raw

Re: [PATCH 1/3] i.MX27: Define base address for SDHC1,2,3

Quoted 2 lines · Alexander Shiyan

Applied all three patches. Thanks

Sascha

Quoted 33 lines
---
 arch/arm/mach-imx/include/mach/imx27-regs.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-imx/include/mach/imx27-regs.h +3 -0
index 3a4325e..b7bebae 100644
@@ -19,12 +19,15 @@
 #define IMX_SPI1_BASE              (0x0e000 + IMX_IO_BASE)
 #define IMX_SPI2_BASE              (0x0f000 + IMX_IO_BASE)
 #define IMX_I2C1_BASE              (0x12000 + IMX_IO_BASE)
+#define IMX_SDHC1_BASE             (0x13000 + IMX_IO_BASE)
+#define IMX_SDHC2_BASE             (0x14000 + IMX_IO_BASE)
 #define IMX_GPIO_BASE              (0x15000 + IMX_IO_BASE)
 #define IMX_TIM4_BASE              (0x19000 + IMX_IO_BASE)
 #define IMX_TIM5_BASE              (0x1a000 + IMX_IO_BASE)
 #define IMX_UART5_BASE             (0x1b000 + IMX_IO_BASE)
 #define IMX_UART6_BASE             (0x1c000 + IMX_IO_BASE)
 #define IMX_I2C2_BASE              (0x1d000 + IMX_IO_BASE)
+#define IMX_SDHC3_BASE             (0x1e000 + IMX_IO_BASE)
 #define IMX_TIM6_BASE              (0x1f000 + IMX_IO_BASE)
 #define IMX_AIPI2_BASE             (0x20000 + IMX_IO_BASE)
 #define IMX_FB_BASE                (0x21000 + IMX_IO_BASE)
Signature · 7 lines
1.7.3.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

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

In reply to Sascha Hauer

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.

---
 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(-)
arch/arm/boards/phycard-i.MX27/pca100.c +1 -1
index 1b43951..f934a9b 100644
@@ -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;
arch/arm/mach-imx/include/mach/devices-imx27.h +9 -1
index 3141d96..faf8ddc 100644
@@ -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);
+}
Signature · 7 lines
1.7.3.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

PATCH 3/3 i.MX51: Fix name definition for SSI3

In reply to Sascha Hauer
---
 arch/arm/mach-imx/include/mach/imx51-regs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-imx/include/mach/imx51-regs.h +1 -1
index c6d14cd..90e81cb 100644
@@ -94,7 +94,7 @@
 #define MX51_MIPI_HSC_BASE_ADDR	(MX51_AIPS2_BASE_ADDR + 0x000DC000)
 #define MX51_ATA_BASE_ADDR	(MX51_AIPS2_BASE_ADDR + 0x000E0000)
 #define MX51_SIM_BASE_ADDR	(MX51_AIPS2_BASE_ADDR + 0x000E4000)
-#define MX51_SSI3BASE_ADDR	(MX51_AIPS2_BASE_ADDR + 0x000E8000)
+#define MX51_SSI3_BASE_ADDR	(MX51_AIPS2_BASE_ADDR + 0x000E8000)
 #define MX51_MXC_FEC_BASE_ADDR	(MX51_AIPS2_BASE_ADDR + 0x000EC000)
 #define MX51_TVE_BASE_ADDR	(MX51_AIPS2_BASE_ADDR + 0x000F0000)
 #define MX51_VPU_BASE_ADDR	(MX51_AIPS2_BASE_ADDR + 0x000F4000)
Signature · 7 lines
1.7.3.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox