Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1335154
| From | Vineet Gupta <Vineet.Gupta1@synopsys.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings |
| Date | 2016-02-16 09:50 +0100 |
| Message-ID | <r2Jux-5sH-5@gated-at.bofh.it> (permalink) |
| References | <qXGQH-1uV-25@gated-at.bofh.it> <qXGQH-1uV-33@gated-at.bofh.it> <qXRj4-1dU-15@gated-at.bofh.it> <qY0FI-7K9-13@gated-at.bofh.it> <qY7Hc-3L6-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 ?
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-16 09:50 +0100
csiph-web