imx8m: fix cache setup for dynamic sdram size
Subsystems (3)
PATCH 1/1 imx8m: fix cache setup for dynamic sdram size
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 PHYS_SDRAM_SIZE.
--- arch/arm/mach-imx/imx8m/soc.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-imx/imx8m/soc.c +3 -0
@@ -210,6 +210,9 @@ int dram_init(void)else gd->ram_size = sdram_size; +/* also update the SDRAM size in the mem_map used externally */ + imx8m_mem_map[5 ].size = sdram_size; +#ifdef PHYS_SDRAM_2_SIZE gd->ram_size +=PHYS_SDRAM_2_SIZE ;#endif
Signature · 1 line
2.7.4
PATCH 1/1 imx8m: fix cache setup for dynamic sdram size
Quoted 7 lines
the
mem_mapstructure containing the size of SDRAM is used in various cache functions incache_v8.cthus 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 inPHYS_SDRAM_SIZE.Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================