[U-Boot,3/4] imx: mmdc_size: Allow building it for i.MX7ULP
diff mbox series

Message ID 20190718180425.29472-3-festevam@gmail.com
State New
Delegated to: Stefano Babic
Headers show
Series
  • [U-Boot,1/4] imx: Place imx_ddr_size() into a separate file
Related show

Commit Message

Fabio Estevam July 18, 2019, 6:04 p.m. UTC
i.MX7ULP uses the same MMDC controller IP as found on i.MX53
and i.MX6, so build mmdc_size.c for i.MX7ULP as well.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 arch/arm/mach-imx/Makefile    | 2 +-
 arch/arm/mach-imx/mmdc_size.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 0c8519be94..b29f90b024 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -48,7 +48,7 @@  obj-$(CONFIG_SECURE_BOOT)    += hab.o
 obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o
 endif
 ifeq ($(SOC),$(filter $(SOC),mx7ulp))
-obj-y  += cache.o
+obj-y  += cache.o mmdc_size.o
 obj-$(CONFIG_SECURE_BOOT) += hab.o
 endif
 ifeq ($(SOC),$(filter $(SOC),vf610))
diff --git a/arch/arm/mach-imx/mmdc_size.c b/arch/arm/mach-imx/mmdc_size.c
index 13f587c38a..1a094726aa 100644
--- a/arch/arm/mach-imx/mmdc_size.c
+++ b/arch/arm/mach-imx/mmdc_size.c
@@ -5,8 +5,10 @@ 
 
 #if defined(CONFIG_MX53)
 #define MEMCTL_BASE	ESDCTL_BASE_ADDR
-#else
+#elif defined(CONFIG_MX6)
 #define MEMCTL_BASE	MMDC_P0_BASE_ADDR
+#elif defined(CONFIG_MX7ULP)
+#define MEMCTL_BASE	MMDC0_RBASE
 #endif
 static const unsigned char col_lookup[] = {9, 10, 11, 8, 12, 9, 9, 9};
 static const unsigned char bank_lookup[] = {3, 2};