diff mbox series

[U-Boot,3/3] rockchip: rk3188: use DM timer instead of rk_timer

Message ID 1524021226-18474-3-git-send-email-kever.yang@rock-chips.com
State Accepted
Commit fd9e0fe0e3f087fd5abec19ebf620c7a79a93040
Delegated to: Philipp Tomsich
Headers show
Series [U-Boot,1/3] rockchip: rk3188: add -u-boot.dtsi for rock-rk3188 | expand

Commit Message

Kever Yang April 18, 2018, 3:13 a.m. UTC
Disable rk_timer as SYS timer and use DM timer instead,
so that we can get a better timer framework, the rk_timer
is going to be clean after we conver to use DM timer or
ARM arch/generic timer.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 arch/arm/mach-rockchip/Makefile           | 2 ++
 arch/arm/mach-rockchip/rk3188-board-spl.c | 2 --
 configs/rock_defconfig                    | 3 +++
 include/configs/rk3188_common.h           | 5 -----
 4 files changed, 5 insertions(+), 7 deletions(-)

Comments

Philipp Tomsich April 25, 2018, 10:04 a.m. UTC | #1
> Disable rk_timer as SYS timer and use DM timer instead,
> so that we can get a better timer framework, the rk_timer
> is going to be clean after we conver to use DM timer or
> ARM arch/generic timer.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  arch/arm/mach-rockchip/Makefile           | 2 ++
>  arch/arm/mach-rockchip/rk3188-board-spl.c | 2 --
>  configs/rock_defconfig                    | 3 +++
>  include/configs/rk3188_common.h           | 5 -----
>  4 files changed, 5 insertions(+), 7 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich April 25, 2018, 10:04 a.m. UTC | #2
> Disable rk_timer as SYS timer and use DM timer instead,
> so that we can get a better timer framework, the rk_timer
> is going to be clean after we conver to use DM timer or
> ARM arch/generic timer.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  arch/arm/mach-rockchip/Makefile           | 2 ++
>  arch/arm/mach-rockchip/rk3188-board-spl.c | 2 --
>  configs/rock_defconfig                    | 3 +++
>  include/configs/rk3188_common.h           | 5 -----
>  4 files changed, 5 insertions(+), 7 deletions(-)
> 

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich April 26, 2018, 7:05 a.m. UTC | #3
> Disable rk_timer as SYS timer and use DM timer instead,
> so that we can get a better timer framework, the rk_timer
> is going to be clean after we conver to use DM timer or
> ARM arch/generic timer.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  arch/arm/mach-rockchip/Makefile           | 2 ++
>  arch/arm/mach-rockchip/rk3188-board-spl.c | 2 --
>  configs/rock_defconfig                    | 3 +++
>  include/configs/rk3188_common.h           | 5 -----
>  4 files changed, 5 insertions(+), 7 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
index e1b0519..096dbac 100644
--- a/arch/arm/mach-rockchip/Makefile
+++ b/arch/arm/mach-rockchip/Makefile
@@ -40,8 +40,10 @@  endif
 obj-$(CONFIG_$(SPL_TPL_)RAM) += sdram_common.o
 
 ifndef CONFIG_ARM64
+ifndef CONFIG_ROCKCHIP_RK3188
 obj-y += rk_timer.o
 endif
+endif
 
 obj-$(CONFIG_ROCKCHIP_RK3036) += rk3036/
 obj-$(CONFIG_ROCKCHIP_RK3128) += rk3128/
diff --git a/arch/arm/mach-rockchip/rk3188-board-spl.c b/arch/arm/mach-rockchip/rk3188-board-spl.c
index 74771d3..3ccc4f1 100644
--- a/arch/arm/mach-rockchip/rk3188-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3188-board-spl.c
@@ -131,8 +131,6 @@  void board_init_f(ulong dummy)
 		hang();
 	}
 
-	rockchip_timer_init();
-
 	ret = rockchip_get_clk(&dev);
 	if (ret) {
 		debug("CLK init failed: %d\n", ret);
diff --git a/configs/rock_defconfig b/configs/rock_defconfig
index f4882a8..e46cc29 100644
--- a/configs/rock_defconfig
+++ b/configs/rock_defconfig
@@ -5,6 +5,9 @@  CONFIG_ARCH_ROCKCHIP=y
 CONFIG_SYS_TEXT_BASE=0x60000000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_ROCKCHIP_RK3188=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ROCKCHIP_TIMER=y
 CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y
 CONFIG_TARGET_ROCK=y
 CONFIG_SPL_STACK_R_ADDR=0x60080000
diff --git a/include/configs/rk3188_common.h b/include/configs/rk3188_common.h
index 94f8cda..e07facd 100644
--- a/include/configs/rk3188_common.h
+++ b/include/configs/rk3188_common.h
@@ -17,11 +17,6 @@ 
 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
 #define CONFIG_SYS_CBSIZE		1024
 
-#define CONFIG_SYS_TIMER_RATE		(24 * 1000 * 1000)
-#define CONFIG_SYS_TIMER_BASE		0x2000e000 /* TIMER3 */
-#define CONFIG_SYS_TIMER_COUNTER	(CONFIG_SYS_TIMER_BASE + 8)
-#define CONFIG_SYS_TIMER_COUNTS_DOWN
-
 #define CONFIG_SYS_NS16550_MEM32
 
 #ifdef CONFIG_SPL_ROCKCHIP_BACK_TO_BROM