linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] clocksource: pass DT node pointer to init functions
Date: Wed, 13 Feb 2013 19:30:26 -0600	[thread overview]
Message-ID: <511C3E32.9010709@gmail.com> (raw)
In-Reply-To: <CAHTX3d+2rGBE3ZBwiHbq7tOi+OE+5KGPh34APzp0NhRP=mBv+w@mail.gmail.com>

On 02/13/2013 11:33 AM, Michal Simek wrote:
> 2013/2/13 Rob Herring <robherring2@gmail.com>:
>> On 02/13/2013 10:21 AM, Michal Simek wrote:
>>> 2013/2/7 Rob Herring <robherring2@gmail.com>:
>>>> From: Rob Herring <rob.herring@calxeda.com>
>>>>
>>>> In cases where we have multiple nodes of the same type, we may need the
>>>> node pointer to know which node was matched. Passing the node pointer
>>>> also keeps the init function from having to match the node a 2nd time.
>>>>
>>>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>>>> Cc: John Stultz <johnstul@us.ibm.com>
>>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>>> ---
>>>>  drivers/clocksource/clksrc-of.c |    4 ++--
>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> Tested-by: Michal Simek <michal.simek@xilinx.com>
>>>
>>> The rest is just the same as I have done. Any option to add these
>>> patches to v3.9?
>>
>> I would like to before we have more users to fix, but it will have to be
>> post rc1. If not, Arnd/Olof should be be able to provide a stable branch
>> for 3.10.
> 
> ok

I now see you were trying to get zynq changes in for 3.9. You could add
this patch to your pull request. As is, it is not dependent on some DT
code changes, but the subsequent patches are. I can send the rest after
rc1. It's a bit of a hack with the function call prototype, but nothing
actually breaks. I was going to combine as Arnd suggested, but either
way is probably fine.

> 
>>> Because I need these patches for zynq timer because we have two in the soc.
>>> Is it OK to register several clock source and clockevent devices?
>>
>> If it is 1 DT node, then that should be fine.
> 
> zynq is using two triple timer counter IP . There are also described by two
> different DT nodes because there are separated and uses different baseaddresses.
> 
> Does it mean that if there are 2 DT nodes that it won't work?
> 
> 
> One more thing. Is there any rule which should describe which timer should be
> used for clockevent and for clocksource?

No. This is a common problem. A simple solution is a "linux,clockevent"
property, but I want to avoid that. Ultimately it is some feature of the
h/w that makes you choose. This could be it has an interrupt or not,
higher frequency, has timer compare pins, gets power gated, etc. So you
should describe enough of the h/w properties to make this decision. OMAP
is an example doing this with lots of timers with varying integration
level differences.

Rob

> 
> 
>>> btw: there is still one issue because you can just setup only one
>>> compatibility string.
>>
>> You can have multiple CLOCKSOURCE_OF_DECLARE statements. The gic code
>> does this for irqchips.
> 
> Ok. Will look at it.
> 
> Thanks,
> Michal
> 
> 

  reply	other threads:[~2013-02-14  1:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 19:09 [PATCH 0/4] Improve CLKSRC_OF matching Rob Herring
2013-02-07 19:09 ` [PATCH 1/4] clocksource: pass DT node pointer to init functions Rob Herring
2013-02-13 16:21   ` Michal Simek
2013-02-13 16:33     ` Rob Herring
2013-02-13 17:33       ` Michal Simek
2013-02-14  1:30         ` Rob Herring [this message]
2013-02-14  6:45           ` Michal Simek
2013-02-14 14:22             ` Rob Herring
2013-02-07 19:09 ` [PATCH 2/4] clocksource: bcm2835: use the device_node pointer passed to init Rob Herring
2013-02-09  3:47   ` Stephen Warren
2013-02-07 19:09 ` [PATCH 3/4] clocksource: vt8500: " Rob Herring
2013-02-07 19:09 ` [PATCH 4/4] clocksource: tegra20: " Rob Herring
2013-02-07 19:39   ` Stephen Warren
2013-02-07 20:05     ` Hiroshi Doyu
2013-02-07 22:44 ` [PATCH 0/4] Improve CLKSRC_OF matching Arnd Bergmann
2013-02-07 23:36   ` Rob Herring
2013-02-07 23:45     ` Arnd Bergmann
2013-02-08  4:51 ` Tony Prisk
2013-02-08 13:07   ` Rob Herring

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=511C3E32.9010709@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@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).