aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irqchip
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2012-10-09 05:54:47 -0400
committerJames Hogan <james.hogan@imgtec.com>2013-03-02 15:09:48 -0500
commit5698c50d9da4ab2f57d98c64ea97675dcaf2a608 (patch)
tree5b82a24daa8bbb85703489340cbfdcb00a2f20a4 /include/linux/irqchip
parent63047ea36070d11f902ab7d09a5a18aea037c0f7 (diff)
metag: Internal and external irqchips
Meta core internal interrupts (from HWSTATMETA and friends) are vectored onto the TR1 core trigger for the current thread. This is demultiplexed in irq-metag.c to individual Linux IRQs for each internal interrupt. External SoC interrupts (from HWSTATEXT and friends) are vectored onto the TR2 core trigger for the current thread. This is demultiplexed in irq-metag-ext.c to individual Linux IRQs for each external SoC interrupt. The external irqchip has devicetree bindings for configuring the number of irq banks and the type of masking available. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Rob Landley <rob@landley.net> Cc: Dom Cobley <popcornmix@gmail.com> Cc: Simon Arlott <simon@fire.lp0.eu> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: devicetree-discuss@lists.ozlabs.org Cc: linux-doc@vger.kernel.org
Diffstat (limited to 'include/linux/irqchip')
-rw-r--r--include/linux/irqchip/metag-ext.h33
-rw-r--r--include/linux/irqchip/metag.h24
2 files changed, 57 insertions, 0 deletions
diff --git a/include/linux/irqchip/metag-ext.h b/include/linux/irqchip/metag-ext.h
new file mode 100644
index 000000000000..697af0fe7c5a
--- /dev/null
+++ b/include/linux/irqchip/metag-ext.h
@@ -0,0 +1,33 @@
1/*
2 * Copyright (C) 2012 Imagination Technologies
3 */
4
5#ifndef _LINUX_IRQCHIP_METAG_EXT_H_
6#define _LINUX_IRQCHIP_METAG_EXT_H_
7
8struct irq_data;
9struct platform_device;
10
11/* called from core irq code at init */
12int init_external_IRQ(void);
13
14/*
15 * called from SoC init_irq() callback to dynamically indicate the lack of
16 * HWMASKEXT registers.
17 */
18void meta_intc_no_mask(void);
19
20/*
21 * These allow SoCs to specialise the interrupt controller from their init_irq
22 * callbacks.
23 */
24
25extern struct irq_chip meta_intc_edge_chip;
26extern struct irq_chip meta_intc_level_chip;
27
28/* this should be called in the mask callback */
29void meta_intc_mask_irq_simple(struct irq_data *data);
30/* this should be called in the unmask callback */
31void meta_intc_unmask_irq_simple(struct irq_data *data);
32
33#endif /* _LINUX_IRQCHIP_METAG_EXT_H_ */
diff --git a/include/linux/irqchip/metag.h b/include/linux/irqchip/metag.h
new file mode 100644
index 000000000000..4ebdfb3101ab
--- /dev/null
+++ b/include/linux/irqchip/metag.h
@@ -0,0 +1,24 @@
1/*
2 * Copyright (C) 2011 Imagination Technologies
3 */
4
5#ifndef _LINUX_IRQCHIP_METAG_H_
6#define _LINUX_IRQCHIP_METAG_H_
7
8#include <linux/errno.h>
9
10#ifdef CONFIG_METAG_PERFCOUNTER_IRQS
11extern int init_internal_IRQ(void);
12extern int internal_irq_map(unsigned int hw);
13#else
14static inline int init_internal_IRQ(void)
15{
16 return 0;
17}
18static inline int internal_irq_map(unsigned int hw)
19{
20 return -EINVAL;
21}
22#endif
23
24#endif /* _LINUX_IRQCHIP_METAG_H_ */