From: csd@broadcom.com (Christian Daudt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4] ARM: bcm281xx: Add timer driver
Date: Mon, 11 Feb 2013 20:44:21 -0800 [thread overview]
Message-ID: <5119C8A5.8040305@broadcom.com> (raw)
In-Reply-To: <5119B96A.7060202@wwwdotorg.org>
On 13-02-11 07:39 PM, Stephen Warren wrote:
> On 02/11/2013 08:25 PM, Christian Daudt wrote:
>> On 13-02-11 07:00 PM, Stephen Warren wrote:
>>> On 02/11/2013 04:44 PM, Christian Daudt wrote:
>>>> This adds support for the Broadcom timer, used in the following SoCs:
>>>> BCM11130, BCM11140, BCM11351, BCM28145, BCM28155
>>>> diff --git a/drivers/clocksource/bcm_kona_timer.c
>>>> b/drivers/clocksource/bcm_kona_timer.c
>>>> +static const struct of_device_id bcm_timer_ids[] __initconst = {
>>>> + {.compatible = "bcm,kona-timer"},
>>>> + {},
>>>> +};
>>>> +
>>>> +static void __init kona_timers_init(void)
>>>> +{
>>>> + struct device_node *node;
>>>> + u32 freq;
>>>> +
>>>> + node = of_find_matching_node(NULL, bcm_timer_ids);
>>>> +
>>>> + if (!node)
>>>> + panic("No timer");
>>> I assume this is for 3.10 now.
>> Oh. I missed 3.9 window ? Got busy with other stuff. Oh well, try again.
>>> Can you rework this to remove
>>> bcm_timer_ids[] and that of_find_matching_node() call, and replace it
>>> with e.g.:
>>>
>>> CLOCKSOURCE_OF_DECLARE(kona, "bcm,kona-timer", kona_timer_init);
>> where can I find an example ? I looked throught armsoc/for-next and the
>> code there has CLOCKSOURCE_OF_DECLARE but it still has
>> of_find_matching_node calls in the init fns - is it still in the process
>> of being removed ?
> It looks like Rob's patches that would allow you to eliminate the
> of_find_matching_node() call aren't checked in yet; I'm not sure if
> they'll make 3.9 or not. I has assumed so, but even if not, I imagine
> they will be available as a dependency branch for you to build on top of
> in 3.10. Those are:
>
> https://lkml.org/lkml/2013/2/7/417
>
> However, you could still convert to CLOCKSOURCE_OF_DECLARE right now;
> the patches to enable that should be in arm-soc's for-next; see
> drivers/clocksource/tegra20_timer.c there for example.
Ok, I've added the CLOCKSOURCE_OF_DECLARE and switched to
clocksource_of_init in board_bcm, following what is in for-next. If this
can't make it to 3.9 then I'll add the of_find_matching_node elimination
in the next patch.
Thanks,
csd
prev parent reply other threads:[~2013-02-12 4:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 23:44 [PATCH V4] ARM: bcm281xx: Add timer driver Christian Daudt
2013-02-12 3:00 ` Stephen Warren
2013-02-12 3:25 ` Christian Daudt
2013-02-12 3:39 ` Stephen Warren
2013-02-12 4:44 ` Christian Daudt [this message]
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=5119C8A5.8040305@broadcom.com \
--to=csd@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.