aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/mpic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/mpic.h')
-rw-r--r--include/asm-powerpc/mpic.h42
1 files changed, 27 insertions, 15 deletions
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h
index a2277cb77ddc..eb241c99c457 100644
--- a/include/asm-powerpc/mpic.h
+++ b/include/asm-powerpc/mpic.h
@@ -129,6 +129,12 @@ struct mpic_irq_fixup
129/* The instance data of a given MPIC */ 129/* The instance data of a given MPIC */
130struct mpic 130struct mpic
131{ 131{
132 /* The device node of the interrupt controller */
133 struct device_node *of_node;
134
135 /* The remapper for this MPIC */
136 struct irq_host *irqhost;
137
132 /* The "linux" controller struct */ 138 /* The "linux" controller struct */
133 struct irq_chip hc_irq; 139 struct irq_chip hc_irq;
134#ifdef CONFIG_MPIC_BROKEN_U3 140#ifdef CONFIG_MPIC_BROKEN_U3
@@ -144,16 +150,12 @@ struct mpic
144 unsigned int isu_size; 150 unsigned int isu_size;
145 unsigned int isu_shift; 151 unsigned int isu_shift;
146 unsigned int isu_mask; 152 unsigned int isu_mask;
147 /* Offset of irq vector numbers */
148 unsigned int irq_offset;
149 unsigned int irq_count; 153 unsigned int irq_count;
150 /* Offset of ipi vector numbers */
151 unsigned int ipi_offset;
152 /* Number of sources */ 154 /* Number of sources */
153 unsigned int num_sources; 155 unsigned int num_sources;
154 /* Number of CPUs */ 156 /* Number of CPUs */
155 unsigned int num_cpus; 157 unsigned int num_cpus;
156 /* senses array */ 158 /* default senses array */
157 unsigned char *senses; 159 unsigned char *senses;
158 unsigned int senses_count; 160 unsigned int senses_count;
159 161
@@ -209,14 +211,11 @@ struct mpic
209 * The values in the array start at the first source of the MPIC, 211 * The values in the array start at the first source of the MPIC,
210 * that is senses[0] correspond to linux irq "irq_offset". 212 * that is senses[0] correspond to linux irq "irq_offset".
211 */ 213 */
212extern struct mpic *mpic_alloc(unsigned long phys_addr, 214extern struct mpic *mpic_alloc(struct device_node *node,
215 unsigned long phys_addr,
213 unsigned int flags, 216 unsigned int flags,
214 unsigned int isu_size, 217 unsigned int isu_size,
215 unsigned int irq_offset,
216 unsigned int irq_count, 218 unsigned int irq_count,
217 unsigned int ipi_offset,
218 unsigned char *senses,
219 unsigned int senses_num,
220 const char *name); 219 const char *name);
221 220
222/* Assign ISUs, to call before mpic_init() 221/* Assign ISUs, to call before mpic_init()
@@ -228,6 +227,22 @@ extern struct mpic *mpic_alloc(unsigned long phys_addr,
228extern void mpic_assign_isu(struct mpic *mpic, unsigned int isu_num, 227extern void mpic_assign_isu(struct mpic *mpic, unsigned int isu_num,
229 unsigned long phys_addr); 228 unsigned long phys_addr);
230 229
230/* Set default sense codes
231 *
232 * @mpic: controller
233 * @senses: array of sense codes
234 * @count: size of above array
235 *
236 * Optionally provide an array (indexed on hardware interrupt numbers
237 * for this MPIC) of default sense codes for the chip. Those are linux
238 * sense codes IRQ_TYPE_*
239 *
240 * The driver gets ownership of the pointer, don't dispose of it or
241 * anything like that. __init only.
242 */
243extern void mpic_set_default_senses(struct mpic *mpic, u8 *senses, int count);
244
245
231/* Initialize the controller. After this has been called, none of the above 246/* Initialize the controller. After this has been called, none of the above
232 * should be called again for this mpic 247 * should be called again for this mpic
233 */ 248 */
@@ -269,9 +284,9 @@ extern void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask);
269void smp_mpic_message_pass(int target, int msg); 284void smp_mpic_message_pass(int target, int msg);
270 285
271/* Fetch interrupt from a given mpic */ 286/* Fetch interrupt from a given mpic */
272extern int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs); 287extern unsigned int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs);
273/* This one gets to the primary mpic */ 288/* This one gets to the primary mpic */
274extern int mpic_get_irq(struct pt_regs *regs); 289extern unsigned int mpic_get_irq(struct pt_regs *regs);
275 290
276/* Set the EPIC clock ratio */ 291/* Set the EPIC clock ratio */
277void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio); 292void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio);
@@ -279,8 +294,5 @@ void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio);
279/* Enable/Disable EPIC serial interrupt mode */ 294/* Enable/Disable EPIC serial interrupt mode */
280void mpic_set_serial_int(struct mpic *mpic, int enable); 295void mpic_set_serial_int(struct mpic *mpic, int enable);
281 296
282/* global mpic for pSeries */
283extern struct mpic *pSeries_mpic;
284
285#endif /* __KERNEL__ */ 297#endif /* __KERNEL__ */
286#endif /* _ASM_POWERPC_MPIC_H */ 298#endif /* _ASM_POWERPC_MPIC_H */