Skip to contentSkip to conversation

board: atmel: remove calls to debug_uart_init

PATCH In review Eugen Hristev 1 participant 2 messages Jun 9, 2022 – Jun 28, 2022 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: atmel: remove calls to debug_uart_init

Since 0dba45864b ("arm: Init the debug UART") ,
the debug_uart_init is now called from crt.S

It's no longer required to call it from the board file.

With the current code, the banned <debug_uart> is printed twice:

<debug_uart>

<debug_uart>

U-Boot 2022.07-rc4-00089-gee3d158fa8 (Jun 08 2022 - 17:39:29 +0300)

Remove all calls from board_early_init_f .

---
 board/atmel/at91sam9260ek/at91sam9260ek.c           | 3 ---
 board/atmel/at91sam9261ek/at91sam9261ek.c           | 3 ---
 board/atmel/at91sam9263ek/at91sam9263ek.c           | 3 ---
 board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c     | 3 ---
 board/atmel/at91sam9n12ek/at91sam9n12ek.c           | 3 ---
 board/atmel/at91sam9rlek/at91sam9rlek.c             | 3 ---
 board/atmel/at91sam9x5ek/at91sam9x5ek.c             | 3 ---
 board/atmel/sam9x60_curiosity/sam9x60_curiosity.c   | 3 ---
 board/atmel/sam9x60ek/sam9x60ek.c                   | 3 ---
 board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c     | 4 ----
 board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c | 4 ----
 board/atmel/sama5d2_icp/sama5d2_icp.c               | 3 ---
 board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c         | 3 ---
 board/atmel/sama5d2_xplained/sama5d2_xplained.c     | 4 ----
 board/atmel/sama5d3_xplained/sama5d3_xplained.c     | 3 ---
 board/atmel/sama5d3xek/sama5d3xek.c                 | 3 ---
 board/atmel/sama5d4_xplained/sama5d4_xplained.c     | 3 ---
 board/atmel/sama5d4ek/sama5d4ek.c                   | 3 ---
 board/atmel/sama7g5ek/sama7g5ek.c                   | 3 ---
 19 files changed, 60 deletions(-)
board/atmel/at91sam9260ek/at91sam9260ek.c +0 -3
index 38f97bce20..a9ea9b558a 100644
@@ -74,9 +74,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/at91sam9261ek/at91sam9261ek.c +0 -3
index 0318eeaa94..8a7a960c26 100644
@@ -234,9 +234,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/at91sam9263ek/at91sam9263ek.c +0 -3
index 3218e14e86..c3e1734dda 100644
@@ -192,9 +192,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +0 -3
index fcca8923e3..347197a606 100644
@@ -258,9 +258,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/at91sam9n12ek/at91sam9n12ek.c +0 -3
index a3fc55bbc3..018fed9cc2 100644
@@ -176,9 +176,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/at91sam9rlek/at91sam9rlek.c +0 -3
index f427ee658b..af59620d0c 100644
@@ -169,9 +169,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/at91sam9x5ek/at91sam9x5ek.c +0 -3
index e0abe4aeb0..8192824c59 100644
@@ -105,9 +105,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/sam9x60_curiosity/sam9x60_curiosity.c +0 -3
index 00de277812..d8f32c93b5 100644
@@ -39,9 +39,6 @@ void board_debug_uart_init(void)
 
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 
board/atmel/sam9x60ek/sam9x60ek.c +0 -3
index 32e5a2bf23..7035fab878 100644
@@ -101,9 +101,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c +0 -4
index b69f1c8cfa..65d0a7532e 100644
@@ -65,10 +65,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
-
 	return 0;
 }
 #endif
board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +0 -4
index 67ada27072..c38585c6fe 100644
@@ -58,10 +58,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
-
 	return 0;
 }
 #endif
board/atmel/sama5d2_icp/sama5d2_icp.c +0 -3
index da697a7b0f..0207770028 100644
@@ -48,9 +48,6 @@ void board_debug_uart_init(void)
 
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 
board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c +0 -3
index cca5bd1d8a..16e9183f54 100644
@@ -108,9 +108,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/sama5d2_xplained/sama5d2_xplained.c +0 -4
index 4bbb05c2fb..9e0f9c3b7e 100644
@@ -64,10 +64,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
-
 	return 0;
 }
 #endif
board/atmel/sama5d3_xplained/sama5d3_xplained.c +0 -3
index c25bf42e0a..a778f2694d 100644
@@ -87,9 +87,6 @@ int board_late_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/sama5d3xek/sama5d3xek.c +0 -3
index b6f8dcd91d..132e7fad1e 100644
@@ -140,9 +140,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/sama5d4_xplained/sama5d4_xplained.c +0 -3
index 2088b48b7e..9fb7e6f308 100644
@@ -102,9 +102,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/sama5d4ek/sama5d4ek.c +0 -3
index 46ec1eb324..ba38533343 100644
@@ -100,9 +100,6 @@ void board_debug_uart_init(void)
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
-#ifdef CONFIG_DEBUG_UART
-	debug_uart_init();
-#endif
 	return 0;
 }
 #endif
board/atmel/sama7g5ek/sama7g5ek.c +0 -3
index ae18ed05e0..7d83e76f9a 100644
@@ -48,9 +48,6 @@ void board_debug_uart_init(void)
 
 int board_early_init_f(void)
 {
-#if (IS_ENABLED(CONFIG_DEBUG_UART))
-	debug_uart_init();
-#endif
 	return 0;
 }
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 9 lines · Eugen Hristev

Since 0dba45864b ("arm: Init the debug UART") ,
the debug_uart_init is now called from crt.S

It's no longer required to call it from the board file.

With the current code, the banned <debug_uart> is printed twice:

<debug_uart>

Quoted 8 lines

<debug_uart>

U-Boot 2022.07-rc4-00089-gee3d158fa8 (Jun 08 2022 - 17:39:29 +0300)

Remove all calls from board_early_init_f .

Applied to u-boot-at91/next