board: nuvoton: use an event to replace last_stage_init()
PATCH 1/1 board: nuvoton: use an event to replace last_stage_init()
Add a new event which handles this function refer commit id 91caa3bb89b112a1421ee2ee3661baf67c64bab9.
Signed-off-by Michael Chang <[email protected]>
--- board/nuvoton/arbel_evb/arbel_evb.c | 5 ++++- board/nuvoton/poleg_evb/poleg_evb.c | 5 ++++- configs/arbel_evb_defconfig | 1 - configs/poleg_evb_defconfig | 1 + 4 files changed, 9 insertions(+), 3 deletions(-)
board/nuvoton/arbel_evb/arbel_evb.c +4 -1
@@ -4,6 +4,7 @@*/ #include <dm.h> +#include <event.h> #include <asm/io.h> #include <asm/arch/gcr.h> #include "../common/uart.h"
@@ -98,9 +99,11 @@ int dram_init_banksize(void)return 0 ; } -int last_stage_init (void ) +static int last_stage_init (void ) {board_set_console ();return 0 ; } +EVENT_SPY_SIMPLE (EVT_LAST_STAGE_INIT , last_stage_init); +
board/nuvoton/poleg_evb/poleg_evb.c +4 -1
@@ -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 ];
@@ -73,3 +74,5 @@ int last_stage_init(void)return 0 ; } +EVENT_SPY_SIMPLE (EVT_LAST_STAGE_INIT , last_stage_init); +
configs/arbel_evb_defconfig +0 -1
@@ -25,7 +25,6 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="run common_bootargs; run romboot" -CONFIG_LAST_STAGE_INIT=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot>" CONFIG_SYS_MAXARGS=32
configs/poleg_evb_defconfig +1 -0
@@ -16,6 +16,7 @@ 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
Signature · 1 line
2.34.1
Quoted 2 lines · Michael Chang
Add a new event which handles this function refer commit id
91caa3bb89b112a1421ee2ee3661baf67c64bab9.
Please rephrase this as:
... refer to commit ("91caa3bb89b1 event: Use an event to replace last_stage_init()")
I'd do that when applying, but:
Quoted 22 lines
Signed-off-by Michael Chang <[email protected]>--- board/nuvoton/arbel_evb/arbel_evb.c | 5 ++++- board/nuvoton/poleg_evb/poleg_evb.c | 5 ++++- configs/arbel_evb_defconfig | 1 - configs/poleg_evb_defconfig | 1 + 4 files changed, 9 insertions(+), 3 deletions(-)board/nuvoton/arbel_evb/arbel_evb.c +1
-0@@ -4,6 +4,7 @@*/ #include <dm.h> +#include <event.h> #include <asm/io.h> #include <asm/arch/gcr.h> #include "../common/uart.h" @@ -98,9 +99,11 @@ int dram_init_banksize(void)return 0 ;
board/nuvoton/arbel_evb/arbel_evb.c int dram_init_banksize(void) · line 108
Quoted 10 lines
board/nuvoton/arbel_evb/arbel_evb.c +2
-1} -int last_stage_init (void ) +static int last_stage_init (void ) {board_set_console ();return 0 ; } +EVENT_SPY_SIMPLE (EVT_LAST_STAGE_INIT , last_stage_init);
Please make board_set_console return in and don't wrap last_stage_init here. Doing so only makes sense when like on the other platform there's more going on in the function.
Signature · 1 line
Tom