rockchip: spl: init stimer only when generic timer available

Some SoCs like rk3188 do not have a generic timer.

Change-Id: Ief0e78d6939ac76eec0ffe08650e1a0d930f2f86
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
Kever Yang 2018-04-17 17:51:53 +08:00
parent b5f1eff776
commit 040db82c36
1 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,7 @@ u32 spl_boot_mode(const u32 boot_device)
__weak void rockchip_stimer_init(void)
{
#ifdef CONFIG_SYS_ARCH_TIMER
#ifndef CONFIG_ARM64
asm volatile("mcr p15, 0, %0, c14, c0, 0"
: : "r"(COUNTER_FREQUENCY));
@ -72,6 +73,7 @@ __weak void rockchip_stimer_init(void)
writel(0xffffffff, CONFIG_ROCKCHIP_STIMER_BASE);
writel(0xffffffff, CONFIG_ROCKCHIP_STIMER_BASE + 4);
writel(1, CONFIG_ROCKCHIP_STIMER_BASE + 0x10);
#endif
}
__weak int arch_cpu_init(void)