lkml.org 
[lkml]   [2017]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2/2] clocksource: sprd: Add timer driver for Spreadtrum SC9860 platform
From
Date

Hi Baolin,


On 08/12/2017 09:20, Baolin Wang wrote:

[ ... ]

>>> +static irqreturn_t sprd_timer_interrupt(int irq, void *dev_id)
>>> +{
>>> + struct clock_event_device *ce = (struct clock_event_device *)dev_id;
>>> + struct timer_of *to = to_timer_of(ce);
>>> +
>>> + sprd_timer_clear_interrupt(timer_of_base(to));
>>> +
>>> + if (clockevent_state_oneshot(ce))
>>> + sprd_timer_disable(timer_of_base(to));
>>> +
>>> + ce->event_handler(ce);
>>> + return IRQ_HANDLED;
>>> +}
>>> +
>>> +static struct timer_of to = {
>>> + .flags = TIMER_OF_IRQ | TIMER_OF_BASE,
>>
>> Why not the TIMER_OF_CLOCK ?
>
> The timer's clock is fixed to 32.768K and no need to divide the
> frequency, so our clock tree does not supply the timer's clock now.

The driver is fine. However, I would like to unify the clk usage in the
timer driver, so if you refer to a clock so the TIMER_OF_CLOCK can be
used, that will nice.



--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

\
 
 \ /
  Last update: 2017-12-12 10:17    [W:0.059 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site