lkml.org 
[lkml]   [2020]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 7/9] clocksource: sp804: add support for Hisilicon sp804 timer
From
Date
On 12/09/2020 13:45, Zhen Lei wrote:
> The ARM SP804 supports a maximum of 32-bit counter, but Hisilicon extends
> it to 64-bit. That means, the registers: TimerXload, TimerXValue and
> TimerXBGLoad are 64bits, all other registers are the same as those in the
> SP804. The driver code can be completely reused except that the register
> offset is different.
>
> Use compatible = "hisilicon,sp804" mark as Hisilicon sp804 timer.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> drivers/clocksource/timer-sp.h | 12 ++++++++++++
> drivers/clocksource/timer-sp804.c | 15 +++++++++++++++
> 2 files changed, 27 insertions(+)
>
> diff --git a/drivers/clocksource/timer-sp.h b/drivers/clocksource/timer-sp.h
> index 1ab75cbed0e0..6ca8d82e8544 100644
> --- a/drivers/clocksource/timer-sp.h
> +++ b/drivers/clocksource/timer-sp.h
> @@ -31,6 +31,18 @@
> #define TIMER_MIS 0x14 /* CVR ro */
> #define TIMER_BGLOAD 0x18 /* CVR rw */
>
> +
> +#define HISI_TIMER_1_BASE 0x00
> +#define HISI_TIMER_2_BASE 0x40
> +#define HISI_TIMER_LOAD 0x00
> +#define HISI_TIMER_VALUE 0x08
> +#define HISI_TIMER_CTRL 0x10
> +#define HISI_TIMER_INTCLR 0x14
> +#define HISI_TIMER_RIS 0x18
> +#define HISI_TIMER_MIS 0x1c
> +#define HISI_TIMER_BGLOAD 0x20

Why not put them in timer-sp804.c directly ?

[ ... ]

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

\
 
 \ /
  Last update: 2020-09-18 10:54    [W:0.088 / U:2.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site