diff options
| author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-04-08 21:36:54 +0200 |
|---|---|---|
| committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-04-08 21:36:54 +0200 |
| commit | 0b824f8dad9fdfc7c1bf9c1d3ac744075eb73ec6 (patch) | |
| tree | 7559859702f2fa02f6a4db64cf10f6c2e3f80c21 /arch/arm/kernel/smp_twd.c | |
| parent | 6dbe51c251a327e012439c4772097a13df43c5b8 (diff) | |
| parent | 3d5a96582303e28c48699f3faaf920ef7d43e6f2 (diff) | |
| download | olio-linux-3.10-0b824f8dad9fdfc7c1bf9c1d3ac744075eb73ec6.tar.xz olio-linux-3.10-0b824f8dad9fdfc7c1bf9c1d3ac744075eb73ec6.zip | |
Merge remote-tracking branch 'arm-soc/clksrc/cleanup' into sunxi/core-for-3.10
Diffstat (limited to 'arch/arm/kernel/smp_twd.c')
| -rw-r--r-- | arch/arm/kernel/smp_twd.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index c092115d903..90525d9d290 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -22,6 +22,7 @@ #include <linux/of_irq.h> #include <linux/of_address.h> +#include <asm/smp_plat.h> #include <asm/smp_twd.h> #include <asm/localtimer.h> @@ -361,20 +362,11 @@ int __init twd_local_timer_register(struct twd_local_timer *tlt) } #ifdef CONFIG_OF -const static struct of_device_id twd_of_match[] __initconst = { - { .compatible = "arm,cortex-a9-twd-timer", }, - { .compatible = "arm,cortex-a5-twd-timer", }, - { .compatible = "arm,arm11mp-twd-timer", }, - { }, -}; - -void __init twd_local_timer_of_register(void) +static void __init twd_local_timer_of_register(struct device_node *np) { - struct device_node *np; int err; - np = of_find_matching_node(NULL, twd_of_match); - if (!np) + if (!is_smp() || !setup_max_cpus) return; twd_ppi = irq_of_parse_and_map(np, 0); @@ -394,4 +386,7 @@ void __init twd_local_timer_of_register(void) out: WARN(err, "twd_local_timer_of_register failed (%d)\n", err); } +CLOCKSOURCE_OF_DECLARE(arm_twd_a9, "arm,cortex-a9-twd-timer", twd_local_timer_of_register); +CLOCKSOURCE_OF_DECLARE(arm_twd_a5, "arm,cortex-a5-twd-timer", twd_local_timer_of_register); +CLOCKSOURCE_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", twd_local_timer_of_register); #endif |