[PATCH 15/42] mci: imx-esdhc-pbl: Add instance 2 for i.MX8MM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unlike the i.MX8MQ the i.MX8MM has three SDHCI controllers. Add support
for picking the base address of the third controller from the instance
number. While at it use the IMX8M_ base addresses rather than the
IMX8MQ_ base addresses.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/mci/imx-esdhc-pbl.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/mci/imx-esdhc-pbl.c b/drivers/mci/imx-esdhc-pbl.c
index 6610cee3b5..caaf1ac9b5 100644
--- a/drivers/mci/imx-esdhc-pbl.c
+++ b/drivers/mci/imx-esdhc-pbl.c
@@ -22,6 +22,7 @@
 #include <mach/atf.h>
 #include <mach/imx6-regs.h>
 #include <mach/imx8mq-regs.h>
+#include <mach/imx8mm-regs.h>
 #include <mach/imx-header.h>
 #endif
 #include "sdhci.h"
@@ -207,10 +208,14 @@ static int imx8m_esdhc_init(struct fsl_esdhc_host *host,
 {
 	switch (instance) {
 	case 0:
-		host->regs = IOMEM(MX8MQ_USDHC1_BASE_ADDR);
+		host->regs = IOMEM(MX8M_USDHC1_BASE_ADDR);
 		break;
 	case 1:
-		host->regs = IOMEM(MX8MQ_USDHC2_BASE_ADDR);
+		host->regs = IOMEM(MX8M_USDHC2_BASE_ADDR);
+		break;
+	case 2:
+		/* Only exists on i.MX8MM, not on i.MX8MQ */
+		host->regs = IOMEM(MX8MM_USDHC3_BASE_ADDR);
 		break;
 	default:
 		return -EINVAL;
@@ -283,7 +288,7 @@ int imx8m_esdhc_load_image(int instance, bool start)
 	if (ret)
 		return ret;
 
-	return esdhc_load_image(&host, MX8MQ_DDR_CSD1_BASE_ADDR,
+	return esdhc_load_image(&host, MX8M_DDR_CSD1_BASE_ADDR,
 				MX8MQ_ATF_BL33_BASE_ADDR, SZ_32K, start);
 }
 #endif
-- 
2.25.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux