diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-02-06 22:17:47 -0500 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-03-11 09:42:08 -0400 |
commit | da4a686a2cfb077a8bfc1697f597e7f86235b822 (patch) | |
tree | a705ed178357d4adaf82218407f27b6b74b341ad /arch/arm/kernel/smp_twd.c | |
parent | 1d16cfb3aeba71bc6ecf2d19ccbabed0426e5c22 (diff) |
ARM: smp_twd: convert to use CLKSRC_OF init
Now that we have OF based init with CLKSRC_OF, convert smp_twd init
function to use it and covert all callers of
twd_local_timer_of_register.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-omap@vger.kernel.org
Cc: spear-devel@list.st.com
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/kernel/smp_twd.c')
-rw-r--r-- | arch/arm/kernel/smp_twd.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 3f2565037480..90525d9d290b 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -362,25 +362,13 @@ int __init twd_local_timer_register(struct twd_local_timer *tlt) | |||
362 | } | 362 | } |
363 | 363 | ||
364 | #ifdef CONFIG_OF | 364 | #ifdef CONFIG_OF |
365 | const static struct of_device_id twd_of_match[] __initconst = { | 365 | static void __init twd_local_timer_of_register(struct device_node *np) |
366 | { .compatible = "arm,cortex-a9-twd-timer", }, | ||
367 | { .compatible = "arm,cortex-a5-twd-timer", }, | ||
368 | { .compatible = "arm,arm11mp-twd-timer", }, | ||
369 | { }, | ||
370 | }; | ||
371 | |||
372 | void __init twd_local_timer_of_register(void) | ||
373 | { | 366 | { |
374 | struct device_node *np; | ||
375 | int err; | 367 | int err; |
376 | 368 | ||
377 | if (!is_smp() || !setup_max_cpus) | 369 | if (!is_smp() || !setup_max_cpus) |
378 | return; | 370 | return; |
379 | 371 | ||
380 | np = of_find_matching_node(NULL, twd_of_match); | ||
381 | if (!np) | ||
382 | return; | ||
383 | |||
384 | twd_ppi = irq_of_parse_and_map(np, 0); | 372 | twd_ppi = irq_of_parse_and_map(np, 0); |
385 | if (!twd_ppi) { | 373 | if (!twd_ppi) { |
386 | err = -EINVAL; | 374 | err = -EINVAL; |
@@ -398,4 +386,7 @@ void __init twd_local_timer_of_register(void) | |||
398 | out: | 386 | out: |
399 | WARN(err, "twd_local_timer_of_register failed (%d)\n", err); | 387 | WARN(err, "twd_local_timer_of_register failed (%d)\n", err); |
400 | } | 388 | } |
389 | CLOCKSOURCE_OF_DECLARE(arm_twd_a9, "arm,cortex-a9-twd-timer", twd_local_timer_of_register); | ||
390 | CLOCKSOURCE_OF_DECLARE(arm_twd_a5, "arm,cortex-a5-twd-timer", twd_local_timer_of_register); | ||
391 | CLOCKSOURCE_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", twd_local_timer_of_register); | ||
401 | #endif | 392 | #endif |