diff options
Diffstat (limited to 'include/asm-powerpc/mpic.h')
-rw-r--r-- | include/asm-powerpc/mpic.h | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index ef0a5458d2b2..b71e7b32a555 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
4 | 4 | ||
5 | #include <linux/irq.h> | 5 | #include <linux/irq.h> |
6 | #include <asm/dcr.h> | ||
6 | 7 | ||
7 | /* | 8 | /* |
8 | * Global registers | 9 | * Global registers |
@@ -225,6 +226,23 @@ struct mpic_irq_fixup | |||
225 | #endif /* CONFIG_MPIC_BROKEN_U3 */ | 226 | #endif /* CONFIG_MPIC_BROKEN_U3 */ |
226 | 227 | ||
227 | 228 | ||
229 | enum mpic_reg_type { | ||
230 | mpic_access_mmio_le, | ||
231 | mpic_access_mmio_be, | ||
232 | #ifdef CONFIG_PPC_DCR | ||
233 | mpic_access_dcr | ||
234 | #endif | ||
235 | }; | ||
236 | |||
237 | struct mpic_reg_bank { | ||
238 | u32 __iomem *base; | ||
239 | #ifdef CONFIG_PPC_DCR | ||
240 | dcr_host_t dhost; | ||
241 | unsigned int dbase; | ||
242 | unsigned int doff; | ||
243 | #endif /* CONFIG_PPC_DCR */ | ||
244 | }; | ||
245 | |||
228 | /* The instance data of a given MPIC */ | 246 | /* The instance data of a given MPIC */ |
229 | struct mpic | 247 | struct mpic |
230 | { | 248 | { |
@@ -264,11 +282,18 @@ struct mpic | |||
264 | spinlock_t fixup_lock; | 282 | spinlock_t fixup_lock; |
265 | #endif | 283 | #endif |
266 | 284 | ||
285 | /* Register access method */ | ||
286 | enum mpic_reg_type reg_type; | ||
287 | |||
267 | /* The various ioremap'ed bases */ | 288 | /* The various ioremap'ed bases */ |
268 | volatile u32 __iomem *gregs; | 289 | struct mpic_reg_bank gregs; |
269 | volatile u32 __iomem *tmregs; | 290 | struct mpic_reg_bank tmregs; |
270 | volatile u32 __iomem *cpuregs[MPIC_MAX_CPUS]; | 291 | struct mpic_reg_bank cpuregs[MPIC_MAX_CPUS]; |
271 | volatile u32 __iomem *isus[MPIC_MAX_ISU]; | 292 | struct mpic_reg_bank isus[MPIC_MAX_ISU]; |
293 | |||
294 | #ifdef CONFIG_PPC_DCR | ||
295 | unsigned int dcr_base; | ||
296 | #endif | ||
272 | 297 | ||
273 | #ifdef CONFIG_MPIC_WEIRD | 298 | #ifdef CONFIG_MPIC_WEIRD |
274 | /* Pointer to HW info array */ | 299 | /* Pointer to HW info array */ |
@@ -305,6 +330,8 @@ struct mpic | |||
305 | #define MPIC_SPV_EOI 0x00000020 | 330 | #define MPIC_SPV_EOI 0x00000020 |
306 | /* No passthrough disable */ | 331 | /* No passthrough disable */ |
307 | #define MPIC_NO_PTHROU_DIS 0x00000040 | 332 | #define MPIC_NO_PTHROU_DIS 0x00000040 |
333 | /* DCR based MPIC */ | ||
334 | #define MPIC_USES_DCR 0x00000080 | ||
308 | 335 | ||
309 | /* MPIC HW modification ID */ | 336 | /* MPIC HW modification ID */ |
310 | #define MPIC_REGSET_MASK 0xf0000000 | 337 | #define MPIC_REGSET_MASK 0xf0000000 |
@@ -337,7 +364,7 @@ struct mpic | |||
337 | * that is senses[0] correspond to linux irq "irq_offset". | 364 | * that is senses[0] correspond to linux irq "irq_offset". |
338 | */ | 365 | */ |
339 | extern struct mpic *mpic_alloc(struct device_node *node, | 366 | extern struct mpic *mpic_alloc(struct device_node *node, |
340 | unsigned long phys_addr, | 367 | phys_addr_t phys_addr, |
341 | unsigned int flags, | 368 | unsigned int flags, |
342 | unsigned int isu_size, | 369 | unsigned int isu_size, |
343 | unsigned int irq_count, | 370 | unsigned int irq_count, |
@@ -350,7 +377,7 @@ extern struct mpic *mpic_alloc(struct device_node *node, | |||
350 | * @phys_addr: physical address of the ISU | 377 | * @phys_addr: physical address of the ISU |
351 | */ | 378 | */ |
352 | extern void mpic_assign_isu(struct mpic *mpic, unsigned int isu_num, | 379 | extern void mpic_assign_isu(struct mpic *mpic, unsigned int isu_num, |
353 | unsigned long phys_addr); | 380 | phys_addr_t phys_addr); |
354 | 381 | ||
355 | /* Set default sense codes | 382 | /* Set default sense codes |
356 | * | 383 | * |