From: Vineet Gupta <Vineet.Gupta1-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: arcml
<linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
Alexey Brodkin
<Alexey.Brodkin-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
Noam Camus <noamc-d5a29ZRxExrQT0dZR+AlfA@public.gmane.org>,
lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Daniel Lezcano
<daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings
Date: Tue, 16 Feb 2016 14:14:20 +0530 [thread overview]
Message-ID: <56C2E164.8020004@synopsys.com> (raw)
In-Reply-To: <CAL_Jsq+15SERAN8B5vcKVG=O8=pLLw5_0-p2STHjyGUu7mx-7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wednesday 03 February 2016 09:09 PM, Rob Herring wrote:
> On Wed, Feb 3, 2016 at 2:04 AM, Vineet Gupta <Vineet.Gupta1-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> wrote:
>> Hi Rob,
>>
>> On Wednesday 03 February 2016 03:33 AM, Rob Herring wrote:
>>> On Tue, Feb 02, 2016 at 04:28:52PM +0530, Vineet Gupta wrote:
>>>> +Required properties:
>>>> +
>>>> +- compatible : should be "snps,arc-timer0"
>>>
>>> timer0 and timer1 are different h/w blocks, not just different
>>> instances?
>>
>> Functionality wise they are identical (only the address of aux regs used to
>> program them are different). Either can be configured to interrupt-on-limit or
>> free-run-and-wrap-around. So we can indeed consider them 2 instances. ARC Linux
>> uses timer0 for tick handling, timer1 for gtod.
>>
>> Do you prefer they not be differentiated as timer0 and timer1 ?
>>
>> So we have
>>
>> CLOCKSOURCE_OF_DECLARE(arc_clkevt, "snps,arc-timer0", arc_clockevent_setup);
>> CLOCKSOURCE_OF_DECLARE(arc_timer1, "snps,arc-timer1", arc_cs_setup_timer1);
>>
>> I don't know how to achieve above, by keeping the DT names the same.
>
> You just need a single CLOCKSOURCE_OF_DECLARE which will be called
> twice. On the first call, setup one timer and on the 2nd call setup
> the other one. IIRC the sp804 timer has something similar.
>
> You'll need a unit address in the node name to distinguish them.
So this is just to distinguish them in DT, but the callback uses a static counter
to do 1st vs. 2nd (and this unit address is not really exposed to code) - correct ?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-02-16 8:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1454410739-24444-1-git-send-email-vgupta@synopsys.com>
2016-02-02 10:58 ` [PATCH 1/9] ARC: [dts] Add clk feeding into timers to DTs Vineet Gupta
2016-02-02 10:58 ` [PATCH 2/9] ARC: [dts] Introduce Timer bindings Vineet Gupta
[not found] ` <1454410739-24444-3-git-send-email-vgupta-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-02-02 12:48 ` Alexey Brodkin
2016-02-02 22:03 ` Rob Herring
2016-02-03 8:04 ` Vineet Gupta
[not found] ` <C2D7FE5348E1B147BCA15975FBA23075F4E87B33-cALIpNOex2c3t6iM5Z/N3fufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2016-02-03 15:39 ` Rob Herring
[not found] ` <CAL_Jsq+15SERAN8B5vcKVG=O8=pLLw5_0-p2STHjyGUu7mx-7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-16 8:44 ` Vineet Gupta [this message]
2016-02-02 13:15 ` Alexey Brodkin
2016-02-02 14:29 ` Vineet Gupta
[not found] ` <56B0BD2F.5080409-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-02-02 15:36 ` Alexey Brodkin
[not found] ` <1454427373.25997.24.camel-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-02-02 22:57 ` Alexey Brodkin
2016-02-03 13:44 ` Alexey Brodkin
[not found] ` <1454507041.3375.39.camel-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-02-03 13:50 ` Alexey Brodkin
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=56C2E164.8020004@synopsys.com \
--to=vineet.gupta1-hkixbcoqz3hwk0htik3j/w@public.gmane.org \
--cc=Alexey.Brodkin-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=noamc-d5a29ZRxExrQT0dZR+AlfA@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/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).