summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-02-17 08:14:59 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-19 08:30:31 +0100
commit09a544e7b6a0f2b4202d54a8c5279204f271918b (patch)
tree236242a0f5ba90a6afd04b23d931bba2e83db4a9 /drivers
parentb2b23193ea3e1ebdef18dccf5f4139a9bdcc14b7 (diff)
downloadbarebox-09a544e7b6a0f2b4202d54a8c5279204f271918b.tar.gz
mci: imx-esdhc-pbl: Add instance 2 for i.MX8MM
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@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mci/imx-esdhc-pbl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/mci/imx-esdhc-pbl.c b/drivers/mci/imx-esdhc-pbl.c
index 6610cee..caaf1ac 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