diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 18:35:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 18:35:58 -0700 |
commit | 84be4ae2c038e2b03d650cbf2a7cfd9e8d6e9e51 (patch) | |
tree | 06f806cdc8bded9ae81c963287beb73a6e961d4b /arch/arm/mach-mxs/timer.c | |
parent | ac9e7ab32fe42489808c8d9fc89ad413d2805766 (diff) | |
parent | 36246a820075b65907112891b77ff7915fdb06a5 (diff) |
Merge tag 'soc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc-specific updates, take 2 from Olof Johansson:
"This branch converts the MXS Freescale platform to use irqdomains and
sparse IRQ, in preparation for DT probing and multiplatform kernels."
* tag 'soc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: mxs: remove mach/irqs.h
ARM: mxs: select SPARSE_IRQ
ARM: mxs: adopt irq_domain support for icoll driver
ARM: mxs: select MULTI_IRQ_HANDLER
ARM: mxs: retrieve timer irq from device tree
gpio/mxs: adopt irq_domain support for mxs gpio driver
Diffstat (limited to 'arch/arm/mach-mxs/timer.c')
-rw-r--r-- | arch/arm/mach-mxs/timer.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c index 02d36de9c4e8..7c3792613392 100644 --- a/arch/arm/mach-mxs/timer.c +++ b/arch/arm/mach-mxs/timer.c @@ -25,6 +25,8 @@ #include <linux/irq.h> #include <linux/clockchips.h> #include <linux/clk.h> +#include <linux/of.h> +#include <linux/of_irq.h> #include <asm/mach/time.h> #include <mach/mxs.h> @@ -244,9 +246,17 @@ static int __init mxs_clocksource_init(struct clk *timer_clk) return 0; } -void __init mxs_timer_init(int irq) +void __init mxs_timer_init(void) { + struct device_node *np; struct clk *timer_clk; + int irq; + + np = of_find_compatible_node(NULL, NULL, "fsl,timrot"); + if (!np) { + pr_err("%s: failed find timrot node\n", __func__); + return; + } timer_clk = clk_get_sys("timrot", NULL); if (IS_ERR(timer_clk)) { @@ -295,5 +305,6 @@ void __init mxs_timer_init(int irq) mxs_clockevent_init(timer_clk); /* Make irqs happen */ + irq = irq_of_parse_and_map(np, 0); setup_irq(irq, &mxs_timer_irq); } |