Re: [U-Boot] [PATCH 32/36] rockchip: remove rk_timer

2019-03-29 Thread Kever Yang
Hi Alexander,

    Thanks for your comment, don't worry, I got this info and have
solution for it.

    rk3188 has moved to use DM timer instead of rk_timer.c, the patch
has been mered at last April and works pretty well, see:

fd9e0fe0e3 rockchip: rk3188: use DM timer instead of rk_timer
f9ef544786 rockchip: rk3188: add timer3 node
7abb7e8fcb rockchip: rk3188: add -u-boot.dtsi for rock-rk3188
e0e1d3f98c rockchip: timer: add compatible strings for rk3188 and rk3288

Thanks,
- Kever
On 03/29/2019 04:35 PM, Alexander Kochetkov wrote:
> Hello, Kever!
>
> Please keep rk_timer.c for rk3188 and other legacy chips. There is
> no ARM generic timer in
> this SoC. This SoC only have private timers.
>
> see 
> https://community.arm.com/developer/ip-products/processors/f/cortex-a-forum/1449/generic-timer-on-cortex-a7-cortex-a9
>
>> 27 марта 2018 г., в 12:29, Kever Yang > > написал(а):
>>
>> We do not use rk_timer.c now, remove it.
>>
>> Signed-off-by: Kever Yang > >
>> ---
>

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 32/36] rockchip: remove rk_timer

2019-03-29 Thread Alexander Kochetkov
Hello, Kever!

Please keep rk_timer.c for rk3188 and other legacy chips. There is no ARM 
generic timer in
this SoC. This SoC only have private timers.

see 
https://community.arm.com/developer/ip-products/processors/f/cortex-a-forum/1449/generic-timer-on-cortex-a7-cortex-a9

> 27 марта 2018 г., в 12:29, Kever Yang  написал(а):
> 
> We do not use rk_timer.c now, remove it.
> 
> Signed-off-by: Kever Yang 
> ---

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 32/36] rockchip: remove rk_timer

2018-03-27 Thread Kever Yang
We do not use rk_timer.c now, remove it.

Signed-off-by: Kever Yang 
---

 arch/arm/mach-rockchip/rk_timer.c | 48 ---
 1 file changed, 48 deletions(-)
 delete mode 100644 arch/arm/mach-rockchip/rk_timer.c

diff --git a/arch/arm/mach-rockchip/rk_timer.c 
b/arch/arm/mach-rockchip/rk_timer.c
deleted file mode 100644
index 853b986..000
--- a/arch/arm/mach-rockchip/rk_timer.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * (C) Copyright 2015 Rockchip Electronics Co., Ltd
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include 
-#include 
-#include 
-#include 
-
-struct rk_timer * const timer_ptr = (void *)CONFIG_SYS_TIMER_BASE;
-
-static uint64_t rockchip_get_ticks(void)
-{
-   uint64_t timebase_h, timebase_l;
-
-   timebase_l = readl(_ptr->timer_curr_value0);
-   timebase_h = readl(_ptr->timer_curr_value1);
-
-   return timebase_h << 32 | timebase_l;
-}
-
-static uint64_t usec_to_tick(unsigned int usec)
-{
-   uint64_t tick = usec;
-   tick *= CONFIG_SYS_TIMER_RATE / (1000 * 1000);
-   return tick;
-}
-
-void rockchip_udelay(unsigned int usec)
-{
-   uint64_t tmp;
-
-   /* get timestamp */
-   tmp = rockchip_get_ticks() + usec_to_tick(usec);
-
-   /* loop till event */
-   while (rockchip_get_ticks() < tmp+1)
-   ;
-}
-
-void rockchip_timer_init(void)
-{
-   writel(0x, _ptr->timer_load_count0);
-   writel(0x, _ptr->timer_load_count1);
-   writel(1, _ptr->timer_ctrl_reg);
-}
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot