ARM: am33xx: Fix DDR initialization delays
PATCH 1/1 ARM: am33xx: Fix DDR initialization delays
The current delays in the DDR initialization routines for am33xx architectures are sometimes not running long enough leading to DDR init errors. On am437x, this shows up as an L3 NOC error after the kernel boots. This is due to the timer not being initialized properly, but instead still containing the timer init values from the boot ROM which cause timers to expire in 1/4th the time required.
timer_init is typically not called until board_init_r, however on am33xx/am43xx udelay is required in sdram_init which is called from board_init_f, so a call to timer_init is required earlier.
Note that this issue introduced in v2015.01 by:
b352dde "am33xx: Drop timer_init call from s_init".
Although this could instead fixed by reverting said commit, it would cause timer_init to be called twice in both SPL and non-SPL cases. This gives a little more fine grained control and also matches what is being done on omap-command and fsl-layerscape.
--- arch/arm/cpu/armv7/am33xx/clock.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/cpu/armv7/am33xx/clock.c +1 -0
@@ -237,4 +237,5 @@ void prcm_init()enable_basic_clocks ();scale_vcores ();setup_dplls (); +timer_init (); }
Signature · 1 line
2.8.1
PATCH 1/1 ARM: am33xx: Fix DDR initialization delays
Quoted 14 lines · Russ Dill
The current delays in the DDR initialization routines for am33xx architectures are sometimes not running long enough leading to DDR init errors. On am437x, this shows up as an L3 NOC error after the kernel boots. This is due to the timer not being initialized properly, but instead still containing the timer init values from the boot ROM which cause timers to expire in 1/4th the time required.
timer_initis typically not called untilboard_init_r, however on am33xx/am43xx udelay is required insdram_initwhich is called fromboard_init_f, so a call totimer_initis required earlier.Note that this issue introduced in v2015.01 by:
Quoted 8 lines
b352dde "am33xx: Drop
timer_initcall froms_init".Although this could instead fixed by reverting said commit, it would cause
timer_initto be called twice in both SPL and non-SPL cases. This gives a little more fine grained control and also matches what is being done on omap-command and fsl-layerscape.Signed-off-by Russ Dill <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160506/b8c5a6db/attachment.sig>