diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2007-08-28 04:47:54 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-13 11:33:20 -0400 |
commit | 52964f87c64e6c6ea671b5bf3030fb1494090a48 (patch) | |
tree | 2e20d81bc05b60b7108733daf5713ea640ad2477 /include/asm-powerpc | |
parent | 0ae0b54565a8dcc2b98de694b998e765de15b713 (diff) |
[POWERPC] Add an optional device_node pointer to the irq_host
The majority of irq_host implementations (3 out of 4) are associated
with a device_node, and need to stash it somewhere. Rather than having
it somewhere different for each host, add an optional device_node pointer
to the irq_host structure.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/irq.h | 8 | ||||
-rw-r--r-- | include/asm-powerpc/mpic.h | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index 0485c53db2b5..1392db456523 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
@@ -124,6 +124,9 @@ struct irq_host { | |||
124 | struct irq_host_ops *ops; | 124 | struct irq_host_ops *ops; |
125 | void *host_data; | 125 | void *host_data; |
126 | irq_hw_number_t inval_irq; | 126 | irq_hw_number_t inval_irq; |
127 | |||
128 | /* Optional device node pointer */ | ||
129 | struct device_node *of_node; | ||
127 | }; | 130 | }; |
128 | 131 | ||
129 | /* The main irq map itself is an array of NR_IRQ entries containing the | 132 | /* The main irq map itself is an array of NR_IRQ entries containing the |
@@ -142,7 +145,7 @@ extern irq_hw_number_t virq_to_hw(unsigned int virq); | |||
142 | 145 | ||
143 | /** | 146 | /** |
144 | * irq_alloc_host - Allocate a new irq_host data structure | 147 | * irq_alloc_host - Allocate a new irq_host data structure |
145 | * @node: device-tree node of the interrupt controller | 148 | * @of_node: optional device-tree node of the interrupt controller |
146 | * @revmap_type: type of reverse mapping to use | 149 | * @revmap_type: type of reverse mapping to use |
147 | * @revmap_arg: for IRQ_HOST_MAP_LINEAR linear only: size of the map | 150 | * @revmap_arg: for IRQ_HOST_MAP_LINEAR linear only: size of the map |
148 | * @ops: map/unmap host callbacks | 151 | * @ops: map/unmap host callbacks |
@@ -156,7 +159,8 @@ extern irq_hw_number_t virq_to_hw(unsigned int virq); | |||
156 | * later during boot automatically (the reverse mapping will use the slow path | 159 | * later during boot automatically (the reverse mapping will use the slow path |
157 | * until that happens). | 160 | * until that happens). |
158 | */ | 161 | */ |
159 | extern struct irq_host *irq_alloc_host(unsigned int revmap_type, | 162 | extern struct irq_host *irq_alloc_host(struct device_node *of_node, |
163 | unsigned int revmap_type, | ||
160 | unsigned int revmap_arg, | 164 | unsigned int revmap_arg, |
161 | struct irq_host_ops *ops, | 165 | struct irq_host_ops *ops, |
162 | irq_hw_number_t inval_irq); | 166 | irq_hw_number_t inval_irq); |
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index 262db6b8da73..0eb3ab9ec2bb 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h | |||
@@ -240,9 +240,6 @@ struct mpic_irq_save { | |||
240 | /* The instance data of a given MPIC */ | 240 | /* The instance data of a given MPIC */ |
241 | struct mpic | 241 | struct mpic |
242 | { | 242 | { |
243 | /* The device node of the interrupt controller */ | ||
244 | struct device_node *of_node; | ||
245 | |||
246 | /* The remapper for this MPIC */ | 243 | /* The remapper for this MPIC */ |
247 | struct irq_host *irqhost; | 244 | struct irq_host *irqhost; |
248 | 245 | ||