rockchip: rk3128: use ARM arch timer instead of rk_timer
authorKever Yang <kever.yang@rock-chips.com>
Tue, 9 Jul 2019 14:00:27 +0000 (22:00 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 20 Jul 2019 15:59:44 +0000 (23:59 +0800)
We prefer to use ARM arch timer instead of rockchip timer, so that
we are using the same timer for SPL, U-Boot and Kernel, which will
make things simple and easy to track to boot time.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/Makefile
arch/arm/mach-rockchip/rk3128-board.c
include/configs/rk3128_common.h

index 3e3aa1c4214b5b6beab253fd7deb699cfeaf3fcf..9afbb055d57ff648adbbb2d7ffd089963606818f 100644 (file)
@@ -41,12 +41,6 @@ endif
 
 obj-$(CONFIG_$(SPL_TPL_)RAM) += sdram_common.o
 
-ifndef CONFIG_ARM64
-ifeq ($(CONFIG_ROCKCHIP_RK3188)$(CONFIG_ROCKCHIP_RK322X)$(CONFIG_ROCKCHIP_RK3036)$(CONFIG_ROCKCHIP_RK3288),)
-obj-y += rk_timer.o
-endif
-endif
-
 obj-$(CONFIG_ROCKCHIP_RK3036) += rk3036/
 obj-$(CONFIG_ROCKCHIP_RK3128) += rk3128/
 ifndef CONFIG_TPL_BUILD
index fa71685af80dcf8e882c585cc35beefd6df6c337..0945829d0e495ff2a31c7ee98be1de5f43d7ae91 100644 (file)
@@ -12,7 +12,6 @@
 #include <asm/arch-rockchip/periph.h>
 #include <asm/arch-rockchip/grf_rk3128.h>
 #include <asm/arch-rockchip/boot_mode.h>
-#include <asm/arch-rockchip/timer.h>
 #include <power/regulator.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -33,8 +32,6 @@ int board_init(void)
 {
        int ret = 0;
 
-       rockchip_timer_init();
-
        ret = regulators_enable_boot_on(false);
        if (ret) {
                debug("%s: Cannot enable boot on regulator\n", __func__);
index 0c08d7af5b3d141f49b5ce42e68b57962c383c12..20d62439fbbbd15449a8da58af9475bc8d6a2533 100644 (file)
 #define CONFIG_SYS_CBSIZE              1024
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
-#define CONFIG_SYS_TIMER_RATE          (24 * 1000 * 1000)
-#define CONFIG_SYS_TIMER_BASE          0x200440a0 /* TIMER5 */
-#define CONFIG_SYS_TIMER_COUNTER       (CONFIG_SYS_TIMER_BASE + 8)
+#define CONFIG_ROCKCHIP_STIMER_BASE    0x200440a0
+#define COUNTER_FREQUENCY              24000000
+#define CONFIG_SYS_ARCH_TIMER
+#define CONFIG_SYS_HZ_CLOCK            24000000
 
 #define CONFIG_SYS_INIT_SP_ADDR                0x60100000
 #define CONFIG_SYS_LOAD_ADDR           0x60800800