From 7158c5987e6999f1fd89b7170c685a7b29bc8322 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 13 Aug 2018 15:02:52 +0200 Subject: ARM: i.MX23: Add memory size detection No need for the boards to manually add memory, we can do this automatically by reading back the memory size from the SDRAM controller. Signed-off-by: Sascha Hauer Signed-off-by: Roland Hieber Signed-off-by: Sascha Hauer --- arch/arm/mach-mxs/soc-imx23.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/mach-mxs/soc-imx23.c') diff --git a/arch/arm/mach-mxs/soc-imx23.c b/arch/arm/mach-mxs/soc-imx23.c index d471c8eb5c..f25fff18c3 100644 --- a/arch/arm/mach-mxs/soc-imx23.c +++ b/arch/arm/mach-mxs/soc-imx23.c @@ -19,6 +19,8 @@ #include #include #include +#include +#include #define HW_CLKCTRL_RESET 0x120 # define HW_CLKCTRL_RESET_CHIP (1 << 1) @@ -37,6 +39,8 @@ static void __noreturn imx23_restart_soc(struct restart_handler *rst) static int imx23_devices_init(void) { + arm_add_mem_device("ram0", IMX_MEMORY_BASE, imx23_get_memsize()); + if (of_get_root_node()) return 0; -- cgit v1.2.3