> > + 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:
> > +
..@vger.kernel.org; linux-arm-ker...@lists.infradead.org; linux-
> ker...@vger.kernel.org; Xiubo Li-B47053
> Subject: [RFC][PATCH 3/3] clocksource: Add Freescale FlexTimer Module (FTM)
> timer support
>
> The Freescale FlexTimer Module time reference is a 16-bit counter
> that
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.
Signed-off-by: Xiubo Li
Cc: Shawn Guo
Cc: Jingchang Lu
---
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.
Signed-off-by: Xiubo Li li.xi...@freescale.com
Cc: Shawn Guo
; linux-arm-ker...@lists.infradead.org; linux-
ker...@vger.kernel.org; Xiubo Li-B47053
Subject: [RFC][PATCH 3/3] clocksource: Add Freescale FlexTimer Module (FTM)
timer support
The Freescale FlexTimer Module time reference is a 16-bit counter
that can be used as an unsigned or signed counter.one 16
[...]
+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;
12 matches
Mail list logo