[PATCH 0/2] 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(-)

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.
Signed-off-by: Massimo Pegorer massimo.pegorer+oss@gmail.com --- arch/arm/mach-rockchip/spl.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index 30be640425..a6396b3c42 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -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

On Wed, 2 Aug 2023 at 11:05, Massimo Pegorer massimo.pegorer@gmail.com wrote:
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.
Signed-off-by: Massimo Pegorer massimo.pegorer+oss@gmail.com
arch/arm/mach-rockchip/spl.c | 2 -- 1 file changed, 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On 2023/8/3 01:05, Massimo Pegorer wrote:
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.
Signed-off-by: Massimo Pegorer massimo.pegorer+oss@gmail.com
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
arch/arm/mach-rockchip/spl.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index 30be640425..a6396b3c42 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -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

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.
Signed-off-by: Massimo Pegorer massimo.pegorer+oss@gmail.com --- arch/arm/mach-rockchip/spl.c | 11 ----------- 1 file changed, 11 deletions(-)
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index a6396b3c42..87280e2ba7 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -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();

On Wed, 2 Aug 2023 at 11:05, Massimo Pegorer massimo.pegorer@gmail.com wrote:
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.
Signed-off-by: Massimo Pegorer massimo.pegorer+oss@gmail.com
arch/arm/mach-rockchip/spl.c | 11 ----------- 1 file changed, 11 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On 2023/8/3 01:05, Massimo Pegorer wrote:
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.
Signed-off-by: Massimo Pegorer massimo.pegorer+oss@gmail.com
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
arch/arm/mach-rockchip/spl.c | 11 ----------- 1 file changed, 11 deletions(-)
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index a6396b3c42..87280e2ba7 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -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();
participants (3)
-
Kever Yang
-
Massimo Pegorer
-
Simon Glass