Skip to contentSkip to conversation

board: freescale: imxrt1020-evk: fix console is not enabled while init dram

PATCH New Giulio Benetti 2 participants 6 messages Apr 4, 2021 – Apr 8, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 board: freescale: imxrt1020-evk: fix console is not enabled while init dram

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().

---
 board/freescale/imxrt1020-evk/imxrt1020-evk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/imxrt1020-evk/imxrt1020-evk.c +1 -1
index 35241acd22..479e66bddc 100644
@@ -60,8 +60,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 */
 }
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 board: freescale: imxrt1050-evk: fix console is not enabled while init dram

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().

---
 board/freescale/imxrt1050-evk/imxrt1050-evk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/imxrt1050-evk/imxrt1050-evk.c +1 -1
index b8d852f097..eb492390db 100644
@@ -60,8 +60,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 */
 }
 
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/3 board: freescale: imxrt1050-evk: fix console is not enabled while init dram

Quoted 7 lines

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().

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
=====================================================================
#3 lore raw

PATCH 3/3 board: st: stm32f746-disco: fix console is not enabled while init dram

In reply to Giulio Benetti

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().

---
 board/st/stm32f746-disco/stm32f746-disco.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/st/stm32f746-disco/stm32f746-disco.c +1 -1
index 143cc6e1ea..efa38a0e26 100644
@@ -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)
Signature · 1 line
2.25.1
#4 lore raw

PATCH 3/3 board: st: stm32f746-disco: fix console is not enabled while init dram

Quoted 7 lines

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().

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
=====================================================================
#5 lore raw

PATCH 1/3 board: freescale: imxrt1020-evk: fix console is not enabled while init dram

In reply to Giulio Benetti
Quoted 7 lines

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().

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