diff options
author | Jim Liu <jim.t90615@gmail.com> | 2024-05-07 17:10:55 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-05-15 10:55:07 -0600 |
commit | 14e1a1b69c8a8e499bf770410082eead139d4da8 (patch) | |
tree | 32f4e6ab73e082b4c3689e0b6461c68b58a4174e | |
parent | 44d79be9caff6c1a4454c74509639fb32d1d8bfc (diff) | |
download | u-boot-WIP/15May2024-next.zip u-boot-WIP/15May2024-next.tar.gz u-boot-WIP/15May2024-next.tar.bz2 |
board: nuvoton: Use an event to replace last_stage_init() and fix build errorWIP/15May2024-next
Followed the new style use event to replace last_stage_init().
Fixed build error After replace last_stage_init().
And remove CONFIG_SYS_SKIP_UART_INIT from defconfig,
system will reuse the setting from bootblock
and skip the baud rate setting.
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
-rw-r--r-- | board/nuvoton/arbel_evb/arbel_evb.c | 7 | ||||
-rw-r--r-- | board/nuvoton/common/Makefile | 2 | ||||
-rw-r--r-- | board/nuvoton/poleg_evb/poleg_evb.c | 6 | ||||
-rw-r--r-- | configs/arbel_evb_defconfig | 1 |
4 files changed, 11 insertions, 5 deletions
diff --git a/board/nuvoton/arbel_evb/arbel_evb.c b/board/nuvoton/arbel_evb/arbel_evb.c index 1f51921..a58f41c 100644 --- a/board/nuvoton/arbel_evb/arbel_evb.c +++ b/board/nuvoton/arbel_evb/arbel_evb.c @@ -4,6 +4,7 @@ */ #include <dm.h> +#include <event.h> #include <asm/io.h> #include <asm/arch/gcr.h> #include "../common/uart.h" @@ -94,9 +95,11 @@ int dram_init_banksize(void) return 0; } -int last_stage_init(void) +static int last_stage_init(void) { +#if CONFIG_IS_ENABLED(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/common/Makefile b/board/nuvoton/common/Makefile index 8fd83b2..3ba494e 100644 --- a/board/nuvoton/common/Makefile +++ b/board/nuvoton/common/Makefile @@ -1 +1 @@ -obj-$(CONFIG_SYS_SKIP_UART_INIT) += uart.o +obj-y += uart.o diff --git a/board/nuvoton/poleg_evb/poleg_evb.c b/board/nuvoton/poleg_evb/poleg_evb.c index 3c4e5aa..13f35f2 100644 --- a/board/nuvoton/poleg_evb/poleg_evb.c +++ b/board/nuvoton/poleg_evb/poleg_evb.c @@ -6,6 +6,7 @@ #include <dm.h> #include <env.h> +#include <event.h> #include <asm/io.h> #include <asm/arch/gcr.h> #include <asm/mach-types.h> @@ -48,7 +49,7 @@ int dram_init(void) return 0; } -int last_stage_init(void) +static int last_stage_init(void) { char value[32]; @@ -68,8 +69,11 @@ int last_stage_init(void) } sprintf(value, "ttyS%d,115200n8", dev->seq_); env_set("console", value); +#if CONFIG_IS_ENABLED(CONFIG_SYS_SKIP_UART_INIT) board_set_console(); +#endif } return 0; } +EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init); diff --git a/configs/arbel_evb_defconfig b/configs/arbel_evb_defconfig index 08753ae..59652a1 100644 --- a/configs/arbel_evb_defconfig +++ b/configs/arbel_evb_defconfig @@ -14,7 +14,6 @@ CONFIG_DEFAULT_DEVICE_TREE="nuvoton-npcm845-evb" CONFIG_DM_RESET=y # CONFIG_PSCI_RESET is not set CONFIG_ARCH_NPCM8XX=y -CONFIG_SYS_SKIP_UART_INIT=y CONFIG_TARGET_ARBEL_EVB=y CONFIG_SYS_LOAD_ADDR=0x06208000 CONFIG_ENV_ADDR=0x803C0000 |