summaryrefslogtreecommitdiff
path: root/arch/xtensa/kernel/time.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2012-11-04 00:29:12 +0400
committerChris Zankel <chris@zankel.net>2012-12-18 21:10:23 -0800
commit2206d5dd9a785a74afc6981f2b13b7a4d4da6f31 (patch)
treea2205c8d26f7b28d3f9cb9a66e18650cb7d48674 /arch/xtensa/kernel/time.c
parent0322cabd39e27614772595abb395871e86ebff66 (diff)
xtensa: add IRQ domains support
IRQ domains provide a mechanism for conversion of linux IRQ numbers to hardware IRQ numbers and vice versus. It is used by OpenFirmware for linking device tree objects to their respective interrupt controllers. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/kernel/time.c')
-rw-r--r--arch/xtensa/kernel/time.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index 19b32a0eaebc..ffb474104311 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -22,6 +22,7 @@
#include <linux/irq.h>
#include <linux/profile.h>
#include <linux/delay.h>
+#include <linux/irqdomain.h>
#include <asm/timex.h>
#include <asm/platform.h>
@@ -52,6 +53,7 @@ static struct irqaction timer_irqaction = {
void __init time_init(void)
{
+ unsigned int irq;
#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
printk("Calibrating CPU frequency ");
platform_calibrate_ccount();
@@ -62,7 +64,8 @@ void __init time_init(void)
/* Initialize the linux timer interrupt. */
- setup_irq(LINUX_TIMER_INT, &timer_irqaction);
+ irq = irq_create_mapping(NULL, LINUX_TIMER_INT);
+ setup_irq(irq, &timer_irqaction);
set_linux_timer(get_ccount() + CCOUNT_PER_JIFFY);
}