mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: boards: phytec-som-am335x: Fallback ram timings
@ 2017-12-14 15:51 Daniel Schultz
  2017-12-15  7:49 ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Schultz @ 2017-12-14 15:51 UTC (permalink / raw)
  To: barebox

The 'get_ram_size' function can return false values with 1GB RAMs during
warm reset. If a not-existing RAM size will be returned, the fallback
RAM timings get loaded to prevent hangs.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
 arch/arm/boards/phytec-som-am335x/lowlevel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/phytec-som-am335x/lowlevel.c b/arch/arm/boards/phytec-som-am335x/lowlevel.c
index b1576ee..5030966 100644
--- a/arch/arm/boards/phytec-som-am335x/lowlevel.c
+++ b/arch/arm/boards/phytec-som-am335x/lowlevel.c
@@ -174,8 +174,9 @@ static noinline void physom_board_init(void *fdt, int sdram, int module_family)
 		/* Find the ram size and set up the correct ram timings */
 		ramsize = get_ram_size((long *) 0x80000000, SZ_1G);
 		timing = get_timings_by_size(module_family, ramsize);
+		/* In case of a failure, load generic ram timings as fallback */
 		if (!timing)
-			hang();
+			timing = get_minimal_timings(module_family);
 	}
 
 	am335x_sdram_init(DDR_IOCTRL, &physom_cmd,
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14 15:51 [PATCH] ARM: boards: phytec-som-am335x: Fallback ram timings Daniel Schultz
2017-12-15  7:49 ` Sascha Hauer
2017-12-22  8:09   ` Daniel Schultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox