
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/tpl.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index 3c007bb4..2c5ce969 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -20,6 +20,7 @@ #include <timestamp.h> #endif
+#if defined(CONFIG_ROCKCHIP_STIMER_BASE) #define TIMER_LOAD_COUNT_L 0x00 #define TIMER_LOAD_COUNT_H 0x04 #define TIMER_CONTROL_REG 0x10 @@ -46,6 +47,7 @@ __weak void rockchip_stimer_init(void) writel(TIMER_EN | TIMER_FMODE, CONFIG_ROCKCHIP_STIMER_BASE + TIMER_CONTROL_REG); } +#endif
void board_init_f(ulong dummy) { @@ -73,8 +75,11 @@ void board_init_f(ulong dummy) hang(); }
+#if defined(CONFIG_ROCKCHIP_STIMER_BASE) /* Init secure timer */ rockchip_stimer_init(); +#endif + /* Init ARM arch timer in arch/arm/cpu/ */ timer_init();