diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-05-06 10:30:27 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-05-29 04:57:11 -0400 |
commit | 088f40b7b027dad6519712ff224a5798dd62a204 (patch) | |
tree | bae6f2d67cc4516471d3b4a6a80da31962cb804b /include/linux/irqdomain.h | |
parent | 3528d82b684680b72fa31881c8c572c5a98b51de (diff) |
genirq: Generic chip: Add linear irq domain support
Provide infrastructure for irq chip implementations which work on
linear irq domains.
- Interface to allocate multiple generic chips which are associated to
the irq domain.
- Interface to get the generic chip pointer for a particular hardware
interrupt in the domain.
- irq domain mapping function to install the chip for a particular
interrupt.
Note: This lacks a removal function for now.
[ Sebastian Hesselbarth: Mask cache and pointer math fixups ]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Jean-Francois Moine <moinejf@free.fr>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Gerlando Falauto <gerlando.falauto@keymile.com>
Cc: Rob Landley <rob@landley.net>
Acked-by: Grant Likely <grant.likely@linaro.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20130506142539.450634298@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irqdomain.h')
-rw-r--r-- | include/linux/irqdomain.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 0d5b17bf5e51..ba2c708adcff 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
@@ -66,6 +66,10 @@ struct irq_domain_ops { | |||
66 | unsigned long *out_hwirq, unsigned int *out_type); | 66 | unsigned long *out_hwirq, unsigned int *out_type); |
67 | }; | 67 | }; |
68 | 68 | ||
69 | extern struct irq_domain_ops irq_generic_chip_ops; | ||
70 | |||
71 | struct irq_domain_chip_generic; | ||
72 | |||
69 | /** | 73 | /** |
70 | * struct irq_domain - Hardware interrupt number translation object | 74 | * struct irq_domain - Hardware interrupt number translation object |
71 | * @link: Element in global irq_domain list. | 75 | * @link: Element in global irq_domain list. |
@@ -109,8 +113,16 @@ struct irq_domain { | |||
109 | 113 | ||
110 | /* Optional device node pointer */ | 114 | /* Optional device node pointer */ |
111 | struct device_node *of_node; | 115 | struct device_node *of_node; |
116 | /* Optional pointer to generic interrupt chips */ | ||
117 | struct irq_domain_chip_generic *gc; | ||
112 | }; | 118 | }; |
113 | 119 | ||
120 | #define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs. | ||
121 | * ie. legacy 8259, gets irqs 1..15 */ | ||
122 | #define IRQ_DOMAIN_MAP_NOMAP 1 /* no fast reverse mapping */ | ||
123 | #define IRQ_DOMAIN_MAP_LINEAR 2 /* linear map of interrupts */ | ||
124 | #define IRQ_DOMAIN_MAP_TREE 3 /* radix tree */ | ||
125 | |||
114 | #ifdef CONFIG_IRQ_DOMAIN | 126 | #ifdef CONFIG_IRQ_DOMAIN |
115 | struct irq_domain *irq_domain_add_simple(struct device_node *of_node, | 127 | struct irq_domain *irq_domain_add_simple(struct device_node *of_node, |
116 | unsigned int size, | 128 | unsigned int size, |