All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] imx8m: fix cache setup for dynamic sdram size
@ 2020-09-25 15:08 Tim Harvey
  2020-12-08  8:00 ` sbabic at denx.de
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Harvey @ 2020-09-25 15:08 UTC (permalink / raw)
  To: u-boot

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.

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

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)
 	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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] imx8m: fix cache setup for dynamic sdram size
  2020-09-25 15:08 [PATCH] imx8m: fix cache setup for dynamic sdram size Tim Harvey
@ 2020-12-08  8:00 ` sbabic at denx.de
  0 siblings, 0 replies; 2+ messages in thread
From: sbabic at denx.de @ 2020-12-08  8:00 UTC (permalink / raw)
  To: u-boot

> 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.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-08  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 15:08 [PATCH] imx8m: fix cache setup for dynamic sdram size Tim Harvey
2020-12-08  8:00 ` sbabic at denx.de

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.