[PATCH v1 9/9] configs: npcm: remove CONFIG_SYS_SKIP_UART_INIT

Jim Liu jim.t90615 at gmail.com
Tue Aug 5 11:18:50 CEST 2025


Set the uart clock frequency according to dts by default.
If CONFIG_SYS_SKIP_UART_INIT is not enabled, no need to
do board_set_console to change the console bootarg.

Signed-off-by: Jim Liu <JJLIU0 at nuvoton.com>
---
 board/nuvoton/arbel_evb/arbel_evb.c | 9 ++++++++-
 board/nuvoton/poleg_evb/poleg_evb.c | 2 ++
 configs/arbel_evb_defconfig         | 1 -
 configs/poleg_evb_defconfig         | 1 -
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/board/nuvoton/arbel_evb/arbel_evb.c b/board/nuvoton/arbel_evb/arbel_evb.c
index 16dbaa96e8c..0fba4a8b709 100644
--- a/board/nuvoton/arbel_evb/arbel_evb.c
+++ b/board/nuvoton/arbel_evb/arbel_evb.c
@@ -94,5 +94,12 @@ int dram_init_banksize(void)
 	return 0;
 }
 
-EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, board_set_console);
+static int last_stage_init(void)
+{
+#ifdef CONFIG_SYS_SKIP_UART_INIT
+	board_set_console();
+#endif
+	return 0;
+}
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
 
diff --git a/board/nuvoton/poleg_evb/poleg_evb.c b/board/nuvoton/poleg_evb/poleg_evb.c
index 0a3c052a019..9dfe9744363 100644
--- a/board/nuvoton/poleg_evb/poleg_evb.c
+++ b/board/nuvoton/poleg_evb/poleg_evb.c
@@ -64,7 +64,9 @@ static int last_stage_init(void)
 		}
 		sprintf(value, "ttyS%d,115200n8", dev->seq_);
 		env_set("console", value);
+#ifdef CONFIG_SYS_SKIP_UART_INIT
 		return board_set_console();
+#endif
 	}
 
 	return 0;
diff --git a/configs/arbel_evb_defconfig b/configs/arbel_evb_defconfig
index 8572ad204d8..11ad19f56db 100644
--- a/configs/arbel_evb_defconfig
+++ b/configs/arbel_evb_defconfig
@@ -17,7 +17,6 @@ CONFIG_SYS_LOAD_ADDR=0x06208000
 CONFIG_WATCHDOG_TIMEOUT_MSECS=120000
 # CONFIG_PSCI_RESET is not set
 CONFIG_ARCH_NPCM8XX=y
-CONFIG_SYS_SKIP_UART_INIT=y
 CONFIG_TARGET_ARBEL_EVB=y
 CONFIG_ENV_ADDR=0x807C0000
 # CONFIG_EFI_LOADER is not set
diff --git a/configs/poleg_evb_defconfig b/configs/poleg_evb_defconfig
index a87e918117c..0803fb1a857 100644
--- a/configs/poleg_evb_defconfig
+++ b/configs/poleg_evb_defconfig
@@ -16,7 +16,6 @@ CONFIG_DEFAULT_DEVICE_TREE="nuvoton-npcm750-evb"
 CONFIG_DM_RESET=y
 CONFIG_SYS_LOAD_ADDR=0x10000000
 CONFIG_TARGET_POLEG=y
-CONFIG_SYS_SKIP_UART_INIT=y
 CONFIG_ENV_ADDR=0x80100000
 CONFIG_FIT=y
 CONFIG_USE_BOOTCOMMAND=y
-- 
2.34.1



More information about the U-Boot mailing list