[PATCH v1 1/2] rockchip: spl: change call condition rockchip_stimer_init()
Johan Jonker
jbx6244 at gmail.com
Sat Dec 25 13:11:30 CET 2021
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 at gmail.com>
---
arch/arm/mach-rockchip/spl.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
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();
--
2.20.1
More information about the U-Boot
mailing list