Skip to contentSkip to conversation

Drop useless call to debug_uart_init

PATCH In review Massimo Pegorer 3 participants 7 messages Aug 2, 2023 – Aug 12, 2023

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

cover Drop useless call to debug_uart_init

Since commit 0dba45864b2a ("arm: Init the debug UART") function debug_uart_init is called in crt files _main before calling board_init_f.

Therefore, there is no need to call it again inside board_init_f implementation as was done in arch/arm/mach-rockchip/spl.c.

Remove also debug message related to debug uart initializazion in board_init_f. If an earliest-as-possible message after debug uart initialization is needed, enable DEBUG_UART_ANNOUNCE Kconfig option, instead.

Massimo Pegorer (2):
rockchip: spl: Drop useless call to debug_uart_init
rockchip: spl: Drop out of scope debug message related to uart init

 arch/arm/mach-rockchip/spl.c | 13 -------------
 1 file changed, 13 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/2 rockchip: spl: Drop useless call to debug_uart_init

Since commit 0dba45864b2a ("arm: Init the debug UART") function debug_uart_init is called in crt files _main before calling board_init_f. Therefore, there is no need to call it again inside board_init_f implementation in arm/mach-rockchip/spl.c.

---
 arch/arm/mach-rockchip/spl.c | 2 --
 1 file changed, 2 deletions(-)
arch/arm/mach-rockchip/spl.c +0 -2
index 30be640425..a6396b3c42 100644
@@ -116,12 +116,10 @@ void board_init_f(ulong dummy)
 	/*
 	 * Debug UART can be used from here if required:
 	 *
-	 * debug_uart_init();
 	 * printch('a');
 	 * printhex8(0x1234);
 	 * printascii("string");
 	 */
-	debug_uart_init();
 	debug("\nspl:debug uart enabled in %s\n", __func__);
 #endif
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] rockchip: spl: Drop useless call to debug_uart_init

Quoted 10 lines · Massimo Pegorer

Since commit 0dba45864b2a ("arm: Init the debug UART") function debug_uart_init is called in crt files _main before calling board_init_f. Therefore, there is no need to call it again inside board_init_f implementation in arm/mach-rockchip/spl.c.

---
 arch/arm/mach-rockchip/spl.c | 2 --
 1 file changed, 2 deletions(-)
Reviewed-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] rockchip: spl: Drop useless call to debug_uart_init

In reply to Massimo Pegorer
Quoted 6 lines · Massimo Pegorer

Since commit 0dba45864b2a ("arm: Init the debug UART") function debug_uart_init is called in crt files _main before calling board_init_f. Therefore, there is no need to call it again inside board_init_f implementation in arm/mach-rockchip/spl.c.

Thanks,
- Kever

Quoted 21 lines
---
  arch/arm/mach-rockchip/spl.c | 2 --
  1 file changed, 2 deletions(-)
arch/arm/mach-rockchip/spl.c +0 -2
index 30be640425..a6396b3c42 100644
@@ -116,12 +116,10 @@ void board_init_f(ulong dummy)
  	/*
  	 * Debug UART can be used from here if required:
  	 *
-	 * debug_uart_init();
  	 * printch('a');
  	 * printhex8(0x1234);
  	 * printascii("string");
  	 */
-	debug_uart_init();
  	debug("\nspl:debug uart enabled in %s\n", __func__);
  #endif
 
#4 lore raw

PATCH 2/2 rockchip: spl: Drop out of scope debug message related to uart init

In reply to Massimo Pegorer

Debug uart is no more inited in board_init_f function: remove this debug message from board_init_f. If an earliest-as-possible message after debug uart initialization is needed, enable DEBUG_UART_ANNOUNCE Kconfig option, instead.

---
 arch/arm/mach-rockchip/spl.c | 11 -----------
 1 file changed, 11 deletions(-)
arch/arm/mach-rockchip/spl.c +0 -11
index a6396b3c42..87280e2ba7 100644
@@ -112,17 +112,6 @@ void board_init_f(ulong dummy)
 {
 	int ret;
 
-#ifdef CONFIG_DEBUG_UART
-	/*
-	 * Debug UART can be used from here if required:
-	 *
-	 * printch('a');
-	 * printhex8(0x1234);
-	 * printascii("string");
-	 */
-	debug("\nspl:debug uart enabled in %s\n", __func__);
-#endif
-
 	board_early_init_f();
 
 	ret = spl_early_init();
Signature · 1 line
2.34.1
Reviewed-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] rockchip: spl: Drop out of scope debug message related to uart init

Quoted 11 lines · Massimo Pegorer

Debug uart is no more inited in board_init_f function: remove this debug message from board_init_f. If an earliest-as-possible message after debug uart initialization is needed, enable DEBUG_UART_ANNOUNCE Kconfig option, instead.

---
 arch/arm/mach-rockchip/spl.c | 11 -----------
 1 file changed, 11 deletions(-)
Reviewed-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] rockchip: spl: Drop out of scope debug message related to uart init

In reply to Massimo Pegorer
Quoted 6 lines · Massimo Pegorer

Debug uart is no more inited in board_init_f function: remove this debug message from board_init_f. If an earliest-as-possible message after debug uart initialization is needed, enable DEBUG_UART_ANNOUNCE Kconfig option, instead.

Thanks,
- Kever

Quoted 26 lines
---
  arch/arm/mach-rockchip/spl.c | 11 -----------
  1 file changed, 11 deletions(-)
arch/arm/mach-rockchip/spl.c +0 -11
index a6396b3c42..87280e2ba7 100644
@@ -112,17 +112,6 @@ void board_init_f(ulong dummy)
  {
  	int ret;
 
-#ifdef CONFIG_DEBUG_UART
-	/*
-	 * Debug UART can be used from here if required:
-	 *
-	 * printch('a');
-	 * printhex8(0x1234);
-	 * printascii("string");
-	 */
-	debug("\nspl:debug uart enabled in %s\n", __func__);
-#endif
-
  	board_early_init_f();
 
  	ret = spl_early_init();