]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: st: stm32f746-disco: fix console is not enabled while init dram
authorGiulio Benetti <giulio.benetti@benettiengineering.com>
Sun, 4 Apr 2021 18:21:35 +0000 (20:21 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 8 Apr 2021 18:29:54 +0000 (20:29 +0200)
While initializing dram in spl_dram_init(), mdelay() is called that in
order calls get_ticks() that  verifies if timer exists, if doesn't, it
throws a panic(), but since preloader_console_init() has still not been
called those panic()s will fail. This doesn't help debugging, so let's
setup console before calling spl_dram_init() by moving it after
spl_dram_init().

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
board/st/stm32f746-disco/stm32f746-disco.c

index 143cc6e1ea2382881e95f2b7b25bba74f8beb0ca..efa38a0e26a6188761a59563f506560e2228b6bb 100644 (file)
@@ -69,8 +69,8 @@ int spl_dram_init(void)
 }
 void spl_board_init(void)
 {
-       spl_dram_init();
        preloader_console_init();
+       spl_dram_init();
        arch_cpu_init(); /* to configure mpu for sdram rw permissions */
 }
 u32 spl_boot_device(void)