From 89bc388a320a0a42c60582b02264a0d95c287c3b Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 18 Jul 2019 15:04:22 -0300 Subject: imx: Place imx_ddr_size() into a separate file Place imx_ddr_size() into a separate file. The motivation for doing this is to be able to easily reuse imx_ddr_size() on i.MX7ULP. Currently imx_ddr_size() is inside arch/arm/mach-imx/cpu.c, which is not built for i.MX7ULP. Changing the logic to allow building cpu.c for i.MX7UP would require adding several ifdef's, leading to a not a very elegant solution. To allow better reuse, just place imx_ddr_size() into a common mmdc_size.c file. Signed-off-by: Fabio Estevam Signed-off-by: Stefano Babic --- arch/arm/mach-imx/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/mach-imx/Makefile') diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index fbd99a3499..cb6ef533de 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -21,6 +21,9 @@ endif ifeq ($(SOC),$(filter $(SOC),mx5 mx6)) obj-y += cpu.o speed.o +ifneq ($(CONFIG_MX51),y) +obj-y += mmdc_size.o +endif obj-$(CONFIG_GPT_TIMER) += timer.o obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o endif -- cgit v1.2.1