]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/sh_intc.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[karo-tx-linux.git] / include / linux / sh_intc.h
index b160645f5599f51547694c1c1771d3e2b03bd04e..6aed0805927f8ea608e3bce754974d53a9bc372f 100644 (file)
@@ -3,6 +3,23 @@
 
 #include <linux/ioport.h>
 
+#ifdef CONFIG_SUPERH
+#define INTC_NR_IRQS   512
+#else
+#define INTC_NR_IRQS   1024
+#endif
+
+/*
+ * Convert back and forth between INTEVT and IRQ values.
+ */
+#ifdef CONFIG_CPU_HAS_INTEVT
+#define evt2irq(evt)           (((evt) >> 5) - 16)
+#define irq2evt(irq)           (((irq) + 16) << 5)
+#else
+#define evt2irq(evt)           (evt)
+#define irq2evt(irq)           (irq)
+#endif
+
 typedef unsigned char intc_enum;
 
 struct intc_vect {