Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-05 Thread Guo Ren
On Thu, Jul 05, 2018 at 11:23:36AM +0200, Daniel Lezcano wrote: > > So I still need "for_each_cpu(cpu, cpu_possible_mask)" to init every > > csky_to ... > > That is what is unclear for me. percpu or IRQF_PERCPU ? IRQF_PERCPU > Have a look at the commit 9995f4f184613fb02ee73092b03545520a72b104, >

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-05 Thread Daniel Lezcano
On 05/07/2018 05:30, Guo Ren wrote: [ ... ] >> >> You can get the value from the timer-of in all the places it is needed. > Ok, I could remove them. > > But in csky_timer_v1_init: ret = timer_of_init(np, to) > We only init 1th cpu's timer_of struct, and others just static inited by: > > DEFINE_

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-04 Thread Guo Ren
On Wed, Jul 04, 2018 at 04:35:43PM +0200, Thomas Gleixner wrote: > On Wed, 4 Jul 2018, Guo Ren wrote: > > On Tue, Jul 03, 2018 at 11:39:05AM +0200, Thomas Gleixner wrote: > > > > +static inline u64 get_ccvr(void) > > > > +{ > > > > + u32 lo, hi, t; > > > > + > > > > + do { > > > > +

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-04 Thread Guo Ren
On Wed, Jul 04, 2018 at 07:05:05PM +0200, Daniel Lezcano wrote: > > create mode 100644 drivers/clocksource/timer-csky-v1.c > > create mode 100644 drivers/clocksource/timer-nationalchip.c > > Provide two separates patches, one for each timer. Ok. > > +obj-$(CONFIG_CSKY) += timer-

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-04 Thread Daniel Lezcano
Hi Guo, as you are introducing a new drivers, add a detailed changelog describing in details the timers. On 01/07/2018 19:34, Guo Ren wrote: > Signed-off-by: Guo Ren > --- > drivers/clocksource/Makefile | 1 + > drivers/clocksource/timer-csky-v1.c | 169 > +

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-04 Thread Thomas Gleixner
On Wed, 4 Jul 2018, Guo Ren wrote: > On Tue, Jul 03, 2018 at 11:39:05AM +0200, Thomas Gleixner wrote: > > > +static inline u64 get_ccvr(void) > > > +{ > > > + u32 lo, hi, t; > > > + > > > + do { > > > + hi = mfcr(PTIM_CCVR_HI); > > > + lo = mfcr(PTIM_CCVR_LO); > > > + t = m

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-04 Thread Guo Ren
On Tue, Jul 03, 2018 at 11:39:05AM +0200, Thomas Gleixner wrote: > -EEMPTYCHANGELOG Ok > > +// SPDX-License-Identifier: GPL-2.0 > > +// Copyright (C) 2018 Hangzhou NationalChip Science & Technology Co.,Ltd. > > newline please Ok > > +#define BITS_CSKY_TIMER56 > > + > > +DECLARE_PER_CPU(struc

Re: [PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-03 Thread Thomas Gleixner
On Mon, 2 Jul 2018, Guo Ren wrote: -EEMPTYCHANGELOG > Signed-off-by: Guo Ren > --- /dev/null > +++ b/drivers/clocksource/timer-csky-v1.c > @@ -0,0 +1,169 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// Copyright (C) 2018 Hangzhou NationalChip Science & Technology Co.,Ltd. newline please > +#in

[PATCH V2 18/19] clocksource: add C-SKY clocksource drivers

2018-07-01 Thread Guo Ren
Signed-off-by: Guo Ren --- drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-csky-v1.c | 169 +++ drivers/clocksource/timer-nationalchip.c | 165 ++ 3 files changed, 335 insertions(+) create mode 100644 driver