Message ID | 20211225121131.17892-1-jbx6244@gmail.com |
---|---|
State | Superseded |
Delegated to: | Kever Yang |
Headers | show |
Series | [v1,1/2] rockchip: spl: change call condition rockchip_stimer_init() | expand |
Hi Johan, On Sat, 25 Dec 2021 at 05:11, Johan Jonker <jbx6244@gmail.com> wrote: > > The Rockchip SoCs rk3066/rk3188 have no CONFIG_ROCKCHIP_STIMER_BASE > defined. Currently only rk3188 has an exception. Make this more > generic and call the function rockchip_stimer_init() only when > CONFIG_ROCKCHIP_STIMER_BASE is available. > > Signed-off-by: Johan Jonker <jbx6244@gmail.com> > --- > arch/arm/mach-rockchip/spl.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) Can you use if(IS_ENABLED(...)) instead of #if ? Regards, Simon
diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index 02c40fb3..4b8b0b39 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -70,7 +70,7 @@ u32 spl_mmc_boot_mode(const u32 boot_device) return MMCSD_MODE_RAW; } -#if !defined(CONFIG_ROCKCHIP_RK3188) +#if defined(CONFIG_ROCKCHIP_STIMER_BASE) #define TIMER_LOAD_COUNT_L 0x00 #define TIMER_LOAD_COUNT_H 0x04 #define TIMER_CONTROL_REG 0x10 @@ -132,9 +132,12 @@ void board_init_f(ulong dummy) hang(); } arch_cpu_init(); -#if !defined(CONFIG_ROCKCHIP_RK3188) + +#if defined(CONFIG_ROCKCHIP_STIMER_BASE) + /* Init secure timer */ rockchip_stimer_init(); #endif + #ifdef CONFIG_SYS_ARCH_TIMER /* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */ timer_init();
The Rockchip SoCs rk3066/rk3188 have no CONFIG_ROCKCHIP_STIMER_BASE defined. Currently only rk3188 has an exception. Make this more generic and call the function rockchip_stimer_init() only when CONFIG_ROCKCHIP_STIMER_BASE is available. Signed-off-by: Johan Jonker <jbx6244@gmail.com> --- arch/arm/mach-rockchip/spl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)