Message ID | alpine.LNX.2.00.1507011619250.13307@localhost.localdomain |
---|---|
State | New |
Headers | show |
On Wed, Jul 1, 2015 at 4:20 PM, Paul Osmialowski <pawelo@king.net.pl> wrote:
> - kinetis_pit_init(kinetis_tmr, (rate / HZ) - 1);
Do you want to do DIV_ROUND_UP() or why is this -1 here?
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/clocksource/timer-kinetis.c b/drivers/clocksource/timer-kinetis.c index 1424308..41ef94f 100644 --- a/drivers/clocksource/timer-kinetis.c +++ b/drivers/clocksource/timer-kinetis.c @@ -61,6 +61,7 @@ struct kinetis_clock_event_ddata { struct clock_event_device evtdev; void __iomem *base; void __iomem *mcr; + unsigned long rate; spinlock_t lock; }; @@ -115,6 +116,7 @@ static int kinetis_clockevent_tmr_set_state_periodic( struct kinetis_clock_event_ddata *pit = container_of(evt, struct kinetis_clock_event_ddata, evtdev); + kinetis_pit_init(pit, (pit->rate / HZ) - 1); kinetis_pit_enable(pit, 1);