devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linaro.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Baolin Wang <baolin.wang@spreadtrum.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	DTML <devicetree@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v3 2/2] clocksource: sprd: Add timer driver for Spreadtrum SC9860 platform
Date: Tue, 12 Dec 2017 17:26:49 +0800	[thread overview]
Message-ID: <CAMz4kuLQyD5=X7PEOX98_drt66yc=Fq+KxMFHDW6tp_yZsxtsQ@mail.gmail.com> (raw)
In-Reply-To: <3c1da7bb-a380-072f-957d-221a6f177217@linaro.org>

Hi Daniel,

On 12 December 2017 at 17:16, Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
>
> 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.

I understand your concern, but I've asked our clock driver owner in
Spreadtrum, we have no related registers to describe the topology of
the RTC fixed 32.768K, so the clock driver can not add timer's clock
node.

-- 
Baolin.wang
Best Regards

  reply	other threads:[~2017-12-12  9:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08  5:03 [PATCH v3 1/2] dt-bindings: clocksource: Add Spreadtrum SC9860 timer Baolin Wang
     [not found] ` <1b80566bd849d68b0fc8de54ecbbc7b4efbb1077.1512708743.git.baolin.wang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
2017-12-08  5:03   ` [PATCH v3 2/2] clocksource: sprd: Add timer driver for Spreadtrum SC9860 platform Baolin Wang
     [not found]     ` <c85f55a434efada592c50f46c0d0532fdb5340b0.1512708743.git.baolin.wang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
2017-12-08  6:58       ` Daniel Lezcano
2017-12-08  8:20         ` Baolin Wang
     [not found]           ` <CAMz4ku+10jTXe4bykByO_iLM33ACTu9jSnrX=i66MD3F79w9dQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-12  9:16             ` Daniel Lezcano
2017-12-12  9:26               ` Baolin Wang [this message]
     [not found]                 ` <CAMz4kuLQyD5=X7PEOX98_drt66yc=Fq+KxMFHDW6tp_yZsxtsQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-12  9:41                   ` Baolin Wang
     [not found]                     ` <CAMz4ku+4F6dLSrt=D9mt7=aaQu1G=deiK50YhBDnTN2jKtFGrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-12  9:43                       ` Daniel Lezcano
2017-12-12  9:42                   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMz4kuLQyD5=X7PEOX98_drt66yc=Fq+KxMFHDW6tp_yZsxtsQ@mail.gmail.com' \
    --to=baolin.wang@linaro.org \
    --cc=baolin.wang@spreadtrum.com \
    --cc=broonie@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).