summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c24xx/irq.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2009-08-14 15:23:34 +0100
committerBen Dooks <ben-linux@fluff.org>2009-08-14 15:23:34 +0100
commit0fbdd270078a3e3ce537a2fb6ffc8a9b2427500c (patch)
treeb75f47e26372ffa2374b744a6991144032eea6ef /arch/arm/plat-s3c24xx/irq.c
parent69e372896791c2e43949b32d4cbe8a714961d3d7 (diff)
parenta2c195fdde20772a90ee98ce3523dcfbda49eee6 (diff)
downloadop-kernel-dev-0fbdd270078a3e3ce537a2fb6ffc8a9b2427500c.zip
op-kernel-dev-0fbdd270078a3e3ce537a2fb6ffc8a9b2427500c.tar.gz
Merge branch 'next-s3c24xx' into next-s3c
Diffstat (limited to 'arch/arm/plat-s3c24xx/irq.c')
-rw-r--r--arch/arm/plat-s3c24xx/irq.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c
index 9587377..d02f5f0 100644
--- a/arch/arm/plat-s3c24xx/irq.c
+++ b/arch/arm/plat-s3c24xx/irq.c
@@ -493,6 +493,38 @@ s3c_irq_demux_extint4t7(unsigned int irq,
}
}
+#ifdef CONFIG_FIQ
+/**
+ * s3c24xx_set_fiq - set the FIQ routing
+ * @irq: IRQ number to route to FIQ on processor.
+ * @on: Whether to route @irq to the FIQ, or to remove the FIQ routing.
+ *
+ * Change the state of the IRQ to FIQ routing depending on @irq and @on. If
+ * @on is true, the @irq is checked to see if it can be routed and the
+ * interrupt controller updated to route the IRQ. If @on is false, the FIQ
+ * routing is cleared, regardless of which @irq is specified.
+ */
+int s3c24xx_set_fiq(unsigned int irq, bool on)
+{
+ u32 intmod;
+ unsigned offs;
+
+ if (on) {
+ offs = irq - FIQ_START;
+ if (offs > 31)
+ return -EINVAL;
+
+ intmod = 1 << offs;
+ } else {
+ intmod = 0;
+ }
+
+ __raw_writel(intmod, S3C2410_INTMOD);
+ return 0;
+}
+#endif
+
+
/* s3c24xx_init_irq
*
* Initialise S3C2410 IRQ system
@@ -505,6 +537,10 @@ void __init s3c24xx_init_irq(void)
int irqno;
int i;
+#ifdef CONFIG_FIQ
+ init_FIQ();
+#endif
+
irqdbf("s3c2410_init_irq: clearing interrupt status flags\n");
/* first, clear all interrupts pending... */
OpenPOWER on IntegriCloud