diff mbox series

imx8m: fix cache setup for dynamic sdram size

Message ID 1601046515-30684-1-git-send-email-tharvey@gateworks.com
State New
Delegated to: Stefano Babic
Headers show
Series imx8m: fix cache setup for dynamic sdram size | expand

Commit Message

Tim Harvey Sept. 25, 2020, 3:08 p.m. UTC
the mem_map structure containing the size of SDRAM is used in various
cache functions in cache_v8.c thus we need to update it with the
sdram size the board is configured with as well. Without this
the cache functions do not get setup properly and can hang
in the case where a board reports more SDRAM than defined in

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
 arch/arm/mach-imx/imx8m/soc.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series


diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 9bca5bf..5df8e17 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -210,6 +210,9 @@  int dram_init(void)
 		gd->ram_size = sdram_size;
+	/* also update the SDRAM size in the mem_map used externally */
+	imx8m_mem_map[5].size = sdram_size;
 	gd->ram_size += PHYS_SDRAM_2_SIZE;