Skip to contentSkip to conversation

am33xx: Remove serial_init in s_init for QSPI/NOR XIP boot

PATCH In review Vignesh R 3 participants 3 messages Nov 20, 2015 – Nov 23, 2015 Arm (32-bit)

lore
Share & tools
lore

Vignesh R

author
#0 lore raw

PATCH 1/1 am33xx: Remove serial_init in s_init for QSPI/NOR XIP boot

serial_init() reads global_data, since global_data is not yet initialized, this can cause unwanted behaviour leading to QSPI XIP boot hang. Also, since serial_init() is anyways called later from boar_init_f(), it does not make sense to do the same in s_init().

Tested on AM437x IDK EVM with QSPI XIP boot.

---
 arch/arm/cpu/armv7/am33xx/board.c | 6 ------
 1 file changed, 6 deletions(-)
arch/arm/cpu/armv7/am33xx/board.c +0 -6
index bd14326cf479..1633ddc6b096 100644
@@ -273,12 +273,6 @@ void s_init(void)
 	set_uart_mux_conf();
 	setup_clocks_for_console();
 	uart_soft_reset();
-#if defined(CONFIG_NOR_BOOT) || defined(CONFIG_QSPI_BOOT)
-	/* TODO: This does not work, gd is not available yet */
-	gd->baudrate = CONFIG_BAUDRATE;
-	serial_init();
-	gd->have_console = 1;
-#endif
 #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
 	/* Enable RTC32K clock */
 	rtc32k_enable();
Signature · 1 line
2.6.3
#1 lore raw

PATCH 1/1 am33xx: Remove serial_init in s_init for QSPI/NOR XIP boot

Quoted 11 lines · Vignesh R

serial_init() reads global_data, since global_data is not yet initialized, this can cause unwanted behaviour leading to QSPI XIP boot hang. Also, since serial_init() is anyways called later from boar_init_f(), it does not make sense to do the same in s_init().

Tested on AM437x IDK EVM with QSPI XIP boot.

---
 arch/arm/cpu/armv7/am33xx/board.c | 6 ------
 1 file changed, 6 deletions(-)
Quoted 21 lines
arch/arm/cpu/armv7/am33xx/board.c +0 -7
index bd14326cf479..1633ddc6b096 100644
@@ -273,12 +273,6 @@ void s_init(void)
        set_uart_mux_conf();
        setup_clocks_for_console();
        uart_soft_reset();
-#if defined(CONFIG_NOR_BOOT) || defined(CONFIG_QSPI_BOOT)
-       /* TODO: This does not work, gd is not available yet */
-       gd->baudrate = CONFIG_BAUDRATE;
-       serial_init();
-       gd->have_console = 1;
-#endif
 #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
        /* Enable RTC32K clock */
        rtc32k_enable();
--

2.6.3

#2 lore raw
In reply to Vignesh R
Quoted 9 lines · Vignesh R

serial_init() reads global_data, since global_data is not yet initialized, this can cause unwanted behaviour leading to QSPI XIP boot hang. Also, since serial_init() is anyways called later from boar_init_f(), it does not make sense to do the same in s_init().

Tested on AM437x IDK EVM with QSPI XIP boot.

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: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151123/cd42e740/attachment.sig>