linux-snps-arc.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Vineet.Gupta1@synopsys.com (Vineet Gupta)
To: linux-snps-arc@lists.infradead.org
Subject: [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@mail.gmail.com>

On Wednesday 03 February 2016 09:09 PM, Rob Herring wrote:
> On Wed, Feb 3, 2016@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@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 ?

  reply	other threads:[~2016-02-16  8:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 10:58 [PATCH 0/9] ARC clockevent/clocksource modernization Vineet Gupta
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
2016-02-02 12:48   ` Alexey Brodkin
2016-02-02 13:15   ` Alexey Brodkin
2016-02-02 14:29     ` Vineet Gupta
2016-02-02 15:36       ` Alexey Brodkin
2016-02-02 22:57         ` Alexey Brodkin
2016-02-03 13:44           ` Alexey Brodkin
2016-02-03 13:50             ` Alexey Brodkin
2016-02-02 22:03   ` Rob Herring
2016-02-03  8:04     ` Vineet Gupta
2016-02-03 15:39       ` Rob Herring
2016-02-16  8:44         ` Vineet Gupta [this message]
2016-02-02 10:58 ` [PATCH 3/9] ARC: clockevent: switch to cpu notifier for clockevent setup Vineet Gupta
2016-02-02 10:58 ` [PATCH 4/9] ARC: clockevent: Prepare for DT based probe Vineet Gupta
2016-02-02 10:58 ` [PATCH 5/9] ARC: clockevent: " Vineet Gupta
2016-02-02 10:58 ` [PATCH 6/9] ARC: clocksource: " Vineet Gupta
2016-02-08 12:10   ` Daniel Lezcano
2016-02-08 12:23     ` Vineet Gupta
2016-02-10 13:38       ` Daniel Lezcano
2016-02-02 10:58 ` [PATCH 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() Vineet Gupta
2016-02-02 12:53   ` Alexey Brodkin
2016-02-02 13:43     ` christian.ruppert
2016-02-02 14:26       ` Alexey Brodkin
2016-02-02 10:58 ` [PATCH 8/9] ARC: [plat-axs] Don't use arc_{get|set}_core_freq() for manipulating core clk Vineet Gupta
2016-02-02 10:58 ` [PATCH 9/9] ARC: RIP arc_{get|set}_core_freq() clk API Vineet Gupta

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@synopsys.com \
    --cc=linux-snps-arc@lists.infradead.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).