summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/irqs-board-mop500.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-03-21 22:51:08 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-04-08 13:59:44 +0200
commiteba52748bee971207ddc44b926c12282d0741e2e (patch)
treeabd82bbd775778f0a71f7b67b2f1aaaa44a7d222 /arch/arm/mach-ux500/irqs-board-mop500.h
parentARM: ux500: get rid of <mach/[hardware|db8500-regs].h> (diff)
downloadlinux-eba52748bee971207ddc44b926c12282d0741e2e.tar.xz
linux-eba52748bee971207ddc44b926c12282d0741e2e.zip
ARM: ux500: make irqs.h local to platform
With the PRCMU out of the way, nothing outside of mach-ux500 uses mach/irqs.h any more, so we can make it a local header file, including the two sub-headers. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500/irqs-board-mop500.h')
-rw-r--r--arch/arm/mach-ux500/irqs-board-mop500.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/irqs-board-mop500.h b/arch/arm/mach-ux500/irqs-board-mop500.h
new file mode 100644
index 000000000000..d526dd8e87d3
--- /dev/null
+++ b/arch/arm/mach-ux500/irqs-board-mop500.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) ST-Ericsson SA 2010
+ *
+ * Author: Rabin Vincent <rabin.vincent@stericsson.com>
+ * License terms: GNU General Public License (GPL) version 2
+ */
+
+#ifndef __MACH_IRQS_BOARD_MOP500_H
+#define __MACH_IRQS_BOARD_MOP500_H
+
+/* Number of AB8500 irqs is taken from header file */
+#include <linux/mfd/abx500/ab8500.h>
+
+#define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START
+#define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \
+ + AB8500_MAX_NR_IRQS)
+
+/* TC35892 */
+#define TC35892_NR_INTERNAL_IRQS 8
+#define TC35892_INT_GPIO(x) (TC35892_NR_INTERNAL_IRQS + (x))
+#define TC35892_NR_GPIOS 24
+#define TC35892_NR_IRQS TC35892_INT_GPIO(TC35892_NR_GPIOS)
+
+#define MOP500_EGPIO_NR_IRQS TC35892_NR_IRQS
+
+#define MOP500_EGPIO_IRQ_BASE MOP500_AB8500_IRQ_END
+#define MOP500_EGPIO_IRQ_END (MOP500_EGPIO_IRQ_BASE \
+ + MOP500_EGPIO_NR_IRQS)
+/* STMPE1601 irqs */
+#define STMPE_NR_INTERNAL_IRQS 9
+#define STMPE_INT_GPIO(x) (STMPE_NR_INTERNAL_IRQS + (x))
+#define STMPE_NR_GPIOS 24
+#define STMPE_NR_IRQS STMPE_INT_GPIO(STMPE_NR_GPIOS)
+
+#define MOP500_STMPE1601_IRQBASE MOP500_EGPIO_IRQ_END
+#define MOP500_STMPE1601_IRQ(x) (MOP500_STMPE1601_IRQBASE + (x))
+
+#define MOP500_STMPE1601_IRQ_END \
+ MOP500_STMPE1601_IRQ(STMPE_NR_INTERNAL_IRQS)
+
+#define MOP500_NR_IRQS MOP500_STMPE1601_IRQ_END
+
+#define MOP500_IRQ_END MOP500_NR_IRQS
+
+/*
+ * We may have several boards, but only one will run at a
+ * time, so the one with most IRQs will bump this ahead,
+ * but the IRQ_BOARD_START remains the same for either board.
+ */
+#if MOP500_IRQ_END > IRQ_BOARD_END
+#undef IRQ_BOARD_END
+#define IRQ_BOARD_END MOP500_IRQ_END
+#endif
+
+#endif