Message ID | 20240312233636.1428749-13-jonas@kwiboo.se |
---|---|
State | Accepted |
Commit | ac58c6f3aa6b5ba6b0c2e226f6349b3480dfdc9e |
Delegated to: | Kever Yang |
Headers | show |
Series | rockchip: rk3399: Migrate to use IO-domain driver | expand |
On 2024/3/13 07:36, Jonas Karlman wrote: > Move the call to gpt_capsule_update_setup() from the weak function > rk_board_late_init() into the main board_late_init() function. > > Also change to use IS_ENABLED() instead for defined(). > > Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Thanks, - Kever > --- > v2: > - New patch, split from "board: rockchip: Add a common ROCK Pi 4 target" > --- > arch/arm/mach-rockchip/board.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c > index 4f666aee706f..dea5805c4665 100644 > --- a/arch/arm/mach-rockchip/board.c > +++ b/arch/arm/mach-rockchip/board.c > @@ -34,7 +34,7 @@ > #include <asm/arch-rockchip/periph.h> > #include <power/regulator.h> > > -#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && defined(CONFIG_EFI_PARTITION) > +#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && IS_ENABLED(CONFIG_EFI_PARTITION) > > #define DFU_ALT_BUF_LEN SZ_1K > > @@ -185,10 +185,6 @@ static void gpt_capsule_update_setup(void) > > __weak int rk_board_late_init(void) > { > -#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && defined(CONFIG_EFI_PARTITION) > - gpt_capsule_update_setup(); > -#endif > - > return 0; > } > > @@ -196,6 +192,10 @@ int board_late_init(void) > { > setup_boot_mode(); > > +#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && IS_ENABLED(CONFIG_EFI_PARTITION) > + gpt_capsule_update_setup(); > +#endif > + > return rk_board_late_init(); > } >
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index 4f666aee706f..dea5805c4665 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -34,7 +34,7 @@ #include <asm/arch-rockchip/periph.h> #include <power/regulator.h> -#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && defined(CONFIG_EFI_PARTITION) +#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && IS_ENABLED(CONFIG_EFI_PARTITION) #define DFU_ALT_BUF_LEN SZ_1K @@ -185,10 +185,6 @@ static void gpt_capsule_update_setup(void) __weak int rk_board_late_init(void) { -#if defined(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && defined(CONFIG_EFI_PARTITION) - gpt_capsule_update_setup(); -#endif - return 0; } @@ -196,6 +192,10 @@ int board_late_init(void) { setup_boot_mode(); +#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && IS_ENABLED(CONFIG_EFI_PARTITION) + gpt_capsule_update_setup(); +#endif + return rk_board_late_init(); }
Move the call to gpt_capsule_update_setup() from the weak function rk_board_late_init() into the main board_late_init() function. Also change to use IS_ENABLED() instead for defined(). Signed-off-by: Jonas Karlman <jonas@kwiboo.se> --- v2: - New patch, split from "board: rockchip: Add a common ROCK Pi 4 target" --- arch/arm/mach-rockchip/board.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)