> > + freq = clk_get_rate(ftm_clk);
> > +
> > + calc_closest_cound_cyc(freq);
> > +
> > + BUG_ON(ftm_clocksource_init(freq));
> > +
> > + BUG_ON(ftm_clockevent_init(freq, irq));
> > +}
> > +CLOCKSOURCE_OF_DECLARE(vf610, "fsl,vf610-ftm-timer", ftm_timer_init);
>
>
> I am not a big fan of
> > Here using the FTM0 as clock event device and the FTM1 as clock
> > source device.
>
> As it is a new driver, please add a more elaborated description of the
> timer.
>
Please see the next version.
> > +#include
> > +#include
> > +#include
> > +#include
> > +#include
> > +#include
>
On 04/16/2014 04:19 AM, Xiubo Li wrote:
The Freescale FlexTimer Module time reference is a 16-bit counter
that can be used as an unsigned or signed counter.one 16-bits
increase counter.
Here using the FTM0 as clock event device and the FTM1 as clock
source device.
As it is a new driver,
On 04/16/2014 04:19 AM, Xiubo Li wrote:
The Freescale FlexTimer Module time reference is a 16-bit counter
that can be used as an unsigned or signed counter.one 16-bits
increase counter.
Here using the FTM0 as clock event device and the FTM1 as clock
source device.
As it is a new driver,
Here using the FTM0 as clock event device and the FTM1 as clock
source device.
As it is a new driver, please add a more elaborated description of the
timer.
Please see the next version.
+#include linux/clk.h
+#include linux/clockchips.h
+#include linux/clocksource.h
+#include
+ freq = clk_get_rate(ftm_clk);
+
+ calc_closest_cound_cyc(freq);
+
+ BUG_ON(ftm_clocksource_init(freq));
+
+ BUG_ON(ftm_clockevent_init(freq, irq));
+}
+CLOCKSOURCE_OF_DECLARE(vf610, fsl,vf610-ftm-timer, ftm_timer_init);
I am not a big fan of those BUG_ON every
[...]
> > +static void ftm_set_mode(enum clock_event_mode mode,
> > + struct clock_event_device *evt)
> > +{
> > + switch (mode) {
> > + case CLOCK_EVT_MODE_PERIODIC:
> > + ftm_set_next_event(peroidic_cyc, evt);
> > + break;
> > + default:
> > +
> -Original Message-
> From: Xiubo Li [mailto:li.xi...@freescale.com]
> Sent: Wednesday, April 16, 2014 10:20 AM
> To: daniel.lezc...@linaro.org; t...@linutronix.de; shawn@linaro.org; Lu
> Jingchang-B35083; Jin Zhengxiong-R64188; Wang Dongsheng-B40534
> Cc:
-Original Message-
From: Xiubo Li [mailto:li.xi...@freescale.com]
Sent: Wednesday, April 16, 2014 10:20 AM
To: daniel.lezc...@linaro.org; t...@linutronix.de; shawn@linaro.org; Lu
Jingchang-B35083; Jin Zhengxiong-R64188; Wang Dongsheng-B40534
Cc: devicet...@vger.kernel.org;
[...]
+static void ftm_set_mode(enum clock_event_mode mode,
+ struct clock_event_device *evt)
+{
+ switch (mode) {
+ case CLOCK_EVT_MODE_PERIODIC:
+ ftm_set_next_event(peroidic_cyc, evt);
+ break;
+ default:
+ break;
10 matches
Mail list logo