From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/10] ARM: ux500: Provide local timer support for Device Tree
Date: Wed, 14 Mar 2012 15:16:56 +0000 [thread overview]
Message-ID: <4F60B668.2080209@arm.com> (raw)
In-Reply-To: <4F60B312.8070900@gmail.com>
On 14/03/12 15:02, Rob Herring wrote:
> On 03/14/2012 08:05 AM, Lee Jones wrote:
>> This enables local timer (AKA: private timer) support for
>> all u8500 based hardware using DT.
>>
>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
>> ---
>> arch/arm/boot/dts/db8500.dtsi | 6 ++++++
>> arch/arm/mach-ux500/localtimer.c | 18 +++++++++++++++++-
>> 2 files changed, 23 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi
>> index cce5df8..35d0146 100644
>> --- a/arch/arm/boot/dts/db8500.dtsi
>> +++ b/arch/arm/boot/dts/db8500.dtsi
>> @@ -34,6 +34,12 @@
>> interrupts = <7>;
>> };
>>
>> + timer at a0410600 {
>> + compatible = "arm,smp-twd";
>> + reg = <0xa0410600 0x20>;
>> + interrupts = <1 13 0x304>;
>> + };
>> +
>> rtc at 80154000 {
>> compatible = "stericsson,db8500-rtc";
>> reg = <0x80154000 0x1000>;
>> diff --git a/arch/arm/mach-ux500/localtimer.c b/arch/arm/mach-ux500/localtimer.c
>> index 5ba1133..295e580 100644
>> --- a/arch/arm/mach-ux500/localtimer.c
>> +++ b/arch/arm/mach-ux500/localtimer.c
>> @@ -14,6 +14,10 @@
>> #include <linux/smp.h>
>> #include <linux/clockchips.h>
>>
>> +#include <linux/of.h>
>> +#include <linux/of_address.h>
>> +#include <linux/of_irq.h>
>> +
>> #include <asm/irq.h>
>> #include <asm/smp_twd.h>
>> #include <asm/localtimer.h>
>> @@ -23,7 +27,19 @@
>> */
>> int __cpuinit local_timer_setup(struct clock_event_device *evt)
>> {
>> - evt->irq = IRQ_LOCALTIMER;
>> + struct device_node *np;
>> +
>> + np = of_find_compatible_node(NULL, NULL, "arm,smp-twd");
>> + if (np) {
>> + if (!twd_base) {
>> + twd_base = of_iomap(np, 0);
>> + WARN_ON(!twd_base);
>> + }
>> + evt->irq = irq_of_parse_and_map(np, 0);
>> + }
>> + else
>> + evt->irq = IRQ_LOCALTIMER;
>> +
>> twd_timer_setup(evt);
>> return 0;
>> }
>
> FYI, this will probably collide with Marc Z's local timer changes queued
> up for 3.4.
Indeed. localtimer.c is gone in -next. This can be replaced by a single
call to twd_local_timer_of_register() from your board file.
See arch/arm/mach-highbank/highbank.c for reference ;-).
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2012-03-14 15:16 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 13:04 [PATCH 0/10] ARM: ux500: Enable Snowball for Device Tree Lee Jones
2012-03-14 13:04 ` [PATCH 01/10] ARM: ux500: CONFIG: Enable Device Tree support for future endeavours Lee Jones
2012-03-15 14:38 ` Linus Walleij
2012-03-14 13:04 ` [PATCH 02/10] ARM: ux500: Initial Device Tree support for Snowball Lee Jones
2012-03-14 13:58 ` Arnd Bergmann
2012-03-14 14:37 ` Lee Jones
2012-03-14 14:56 ` Arnd Bergmann
2012-03-15 14:39 ` Linus Walleij
2012-03-14 13:04 ` [PATCH 03/10] ARM: ux500: combine the board init functions for DT boot Lee Jones
2012-03-15 14:39 ` Linus Walleij
2012-03-14 13:05 ` [PATCH 04/10] ARM: ux500: split dts file for snowball into generic part Lee Jones
2012-03-15 15:56 ` Linus Walleij
2012-03-14 13:05 ` [PATCH 05/10] ARM: ux500: db8500: list most devices in the snowball device tree Lee Jones
2012-03-14 13:59 ` Arnd Bergmann
2012-03-15 16:05 ` Linus Walleij
2012-03-14 13:05 ` [PATCH 06/10] ARM: ux500: Enable Cortex-A9 GIC (Generic Interrupt Controller) in Device Tree Lee Jones
2012-03-14 14:00 ` Arnd Bergmann
2012-03-15 16:06 ` Linus Walleij
2012-03-14 13:05 ` [PATCH 07/10] ARM: ux500: Provide local timer support for " Lee Jones
2012-03-14 14:00 ` Arnd Bergmann
2012-03-14 15:02 ` Rob Herring
2012-03-14 15:16 ` Marc Zyngier [this message]
2012-03-15 17:47 ` Linus Walleij
2012-03-14 13:05 ` [PATCH 08/10] ARM: ux500: Enable PL011 AMBA UART Controller " Lee Jones
2012-03-14 14:01 ` Arnd Bergmann
2012-03-14 15:00 ` Rob Herring
2012-03-14 15:36 ` Lee Jones
2012-03-15 16:08 ` Linus Walleij
2012-03-14 13:05 ` [PATCH 09/10] ARM: ux500: Enable PL310 Level 2 Cache Controller in " Lee Jones
2012-03-14 14:01 ` Arnd Bergmann
2012-03-15 16:09 ` Linus Walleij
2012-03-14 13:05 ` [PATCH 10/10] ARM: ux500: Enable PL022 SSP " Lee Jones
2012-03-14 14:05 ` Arnd Bergmann
2012-03-15 16:13 ` Linus Walleij
2012-03-15 16:11 ` Linus Walleij
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=4F60B668.2080209@arm.com \
--to=marc.zyngier@arm.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).