diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/irqdomain.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index f95553fa6872..7fef39ed5523 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
| @@ -39,6 +39,9 @@ struct device_node; | |||
| 39 | struct irq_domain; | 39 | struct irq_domain; |
| 40 | struct of_device_id; | 40 | struct of_device_id; |
| 41 | 41 | ||
| 42 | /* Number of irqs reserved for a legacy isa controller */ | ||
| 43 | #define NUM_ISA_INTERRUPTS 16 | ||
| 44 | |||
| 42 | /* This type is the placeholder for a hardware interrupt number. It has to | 45 | /* This type is the placeholder for a hardware interrupt number. It has to |
| 43 | * be big enough to enclose whatever representation is used by a given | 46 | * be big enough to enclose whatever representation is used by a given |
| 44 | * platform. | 47 | * platform. |
| @@ -98,6 +101,11 @@ struct irq_domain { | |||
| 98 | union { | 101 | union { |
| 99 | struct { | 102 | struct { |
| 100 | unsigned int size; | 103 | unsigned int size; |
| 104 | unsigned int first_irq; | ||
| 105 | irq_hw_number_t first_hwirq; | ||
| 106 | } legacy; | ||
| 107 | struct { | ||
| 108 | unsigned int size; | ||
| 101 | unsigned int *revmap; | 109 | unsigned int *revmap; |
| 102 | } linear; | 110 | } linear; |
| 103 | struct radix_tree_root tree; | 111 | struct radix_tree_root tree; |
| @@ -117,6 +125,9 @@ struct irq_domain { | |||
| 117 | #ifdef CONFIG_IRQ_DOMAIN | 125 | #ifdef CONFIG_IRQ_DOMAIN |
| 118 | #ifdef CONFIG_PPC | 126 | #ifdef CONFIG_PPC |
| 119 | struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, | 127 | struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, |
| 128 | unsigned int size, | ||
| 129 | unsigned int first_irq, | ||
| 130 | irq_hw_number_t first_hwirq, | ||
| 120 | struct irq_domain_ops *ops, | 131 | struct irq_domain_ops *ops, |
| 121 | void *host_data); | 132 | void *host_data); |
| 122 | struct irq_domain *irq_domain_add_linear(struct device_node *of_node, | 133 | struct irq_domain *irq_domain_add_linear(struct device_node *of_node, |
| @@ -130,11 +141,18 @@ struct irq_domain *irq_domain_add_tree(struct device_node *of_node, | |||
| 130 | struct irq_domain_ops *ops, | 141 | struct irq_domain_ops *ops, |
| 131 | void *host_data); | 142 | void *host_data); |
| 132 | 143 | ||
| 133 | |||
| 134 | extern struct irq_domain *irq_find_host(struct device_node *node); | 144 | extern struct irq_domain *irq_find_host(struct device_node *node); |
| 135 | extern void irq_set_default_host(struct irq_domain *host); | 145 | extern void irq_set_default_host(struct irq_domain *host); |
| 136 | extern void irq_set_virq_count(unsigned int count); | 146 | extern void irq_set_virq_count(unsigned int count); |
| 137 | 147 | ||
| 148 | static inline struct irq_domain *irq_domain_add_legacy_isa( | ||
| 149 | struct device_node *of_node, | ||
| 150 | struct irq_domain_ops *ops, | ||
| 151 | void *host_data) | ||
| 152 | { | ||
| 153 | return irq_domain_add_legacy(of_node, NUM_ISA_INTERRUPTS, 0, 0, ops, | ||
| 154 | host_data); | ||
| 155 | } | ||
| 138 | 156 | ||
| 139 | extern unsigned int irq_create_mapping(struct irq_domain *host, | 157 | extern unsigned int irq_create_mapping(struct irq_domain *host, |
| 140 | irq_hw_number_t hwirq); | 158 | irq_hw_number_t hwirq); |
