diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2019-07-09 22:05:59 +0800 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2019-07-20 23:59:44 +0800 |
commit | 87ac550862edd3540be4030f2bc266f4b5182fa3 (patch) | |
tree | bea15b2ac244f666d3bbcb87cdc2207d3df3d3be /arch/arm/mach-rockchip/rk3399-board-tpl.c | |
parent | 82560cb311017a656e83f797e5480768c16d7a6d (diff) |
rockchip: rk3399: use common secure_timer_init() for spl/tpl
SPL/TPL share the same secure_timer_init(), update to use
one copy source code and update to use CONFIG_ROCKCHIP_STIMER_BASE
as base address and rename to function name to rockchip_stimer_init().
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'arch/arm/mach-rockchip/rk3399-board-tpl.c')
-rw-r--r-- | arch/arm/mach-rockchip/rk3399-board-tpl.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/arch/arm/mach-rockchip/rk3399-board-tpl.c b/arch/arm/mach-rockchip/rk3399-board-tpl.c index 4a301249b4..740470de46 100644 --- a/arch/arm/mach-rockchip/rk3399-board-tpl.c +++ b/arch/arm/mach-rockchip/rk3399-board-tpl.c @@ -12,24 +12,8 @@ #include <asm/io.h> #include <asm/arch-rockchip/bootrom.h> -#define TIMER_CHN10_BASE 0xff8680a0 -#define TIMER_END_COUNT_L 0x00 -#define TIMER_END_COUNT_H 0x04 -#define TIMER_INIT_COUNT_L 0x10 -#define TIMER_INIT_COUNT_H 0x14 -#define TIMER_CONTROL_REG 0x1c - -#define TIMER_EN 0x1 -#define TIMER_FMODE (0 << 1) -#define TIMER_RMODE (1 << 1) - -void secure_timer_init(void) +__weak void rockchip_stimer_init(void) { - writel(0xffffffff, TIMER_CHN10_BASE + TIMER_END_COUNT_L); - writel(0xffffffff, TIMER_CHN10_BASE + TIMER_END_COUNT_H); - writel(0, TIMER_CHN10_BASE + TIMER_INIT_COUNT_L); - writel(0, TIMER_CHN10_BASE + TIMER_INIT_COUNT_H); - writel(TIMER_EN | TIMER_FMODE, TIMER_CHN10_BASE + TIMER_CONTROL_REG); } void board_init_f(ulong dummy) @@ -55,7 +39,7 @@ void board_init_f(ulong dummy) hang(); } - secure_timer_init(); + rockchip_stimer_init(); ret = uclass_get_device(UCLASS_RAM, 0, &dev); if (ret) { |