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,
> changelog and the comment in the init function.
> 
> Can you give a similar description for this timer ?
Ok, thx for the tip.

> > #define STATUS_CLR  BIT(0)
> > 
> > #define CONTRL_RST  BIT(0)
> > #define CONTRL_START        BIT(1)
> > 
> > #define CONFIG_EN   BIT(0)
> > #define CONFIG_IRQ_EN       BIT(1)
> 
> NATCHIP_STATUS_CLR
> NATCHIP_CONTROL_RST
> NATCHIP_CONTROL_START
> 
> NATCHIP_CONFIG_EN
> NATCHIP_CONFIG_IRQ_EN
Ok

> >>> +         .rating = 300,
> >>> +         .features = CLOCK_EVT_FEAT_DYNIRQ | CLOCK_EVT_FEAT_PERIODIC |
> >>> +                 CLOCK_EVT_FEAT_ONESHOT,
> >>> +         .set_state_shutdown     = nc_timer_shutdown,
> >>> +         .set_state_periodic     = nc_timer_set_periodic,
> >>> +         .set_next_event         = nc_timer_set_next_event,
> >>
> >> set_oneshot ?
> > Yes oneshort, but also could support periodic. But in fact, it only
> > works with oneshort.
> 
> In the flags, it is specified periodic and oneshot but only the
> set_periodic ops is set.
Got it, add set_oneshot.

> > Thx, I'll modify it like this:
> > div = (timer_of_rate(&to) / TIMER_FREQ) - 1;
> 
> I wanted to be sure it wasn't the latter. In this case, you don't need
> parenthesis, so just add the spaces around the '/' operator.
Ok

 Guo Ren

Reply via email to