Re: [PATCH 1/2] clocksource: Add Oxford Semiconductor RPS Dual Timer

2016-06-01 Thread Neil Armstrong
On 06/01/2016 09:03 AM, Thomas Gleixner wrote: > On Tue, 31 May 2016, Neil Armstrong wrote: >> +static int oxnas_rps_timer_shutdown(struct clock_event_device *evt) >> +{ >> +struct oxnas_rps_timer *rps = >> +container_of(evt, struct oxnas_rps_timer, clkevent); >> + >> +if (!cloc

Re: [PATCH 1/2] clocksource: Add Oxford Semiconductor RPS Dual Timer

2016-06-01 Thread Thomas Gleixner
On Tue, 31 May 2016, Neil Armstrong wrote: > +static int oxnas_rps_timer_shutdown(struct clock_event_device *evt) > +{ > + struct oxnas_rps_timer *rps = > + container_of(evt, struct oxnas_rps_timer, clkevent); > + > + if (!clockevent_state_periodic(evt)) > + return 0

[PATCH 1/2] clocksource: Add Oxford Semiconductor RPS Dual Timer

2016-05-31 Thread Neil Armstrong
Add clocksource and clockevent driver from dual RPS timer. The HW provides a dual one-shot or periodic 24bit timers, the drivers set the first one as tick event source and the second as a continuous scheduler clock source. The timer can use 1, 16 or 256 as pre-dividers, thus the clocksource uses 16