4 /* The MPC8xx cores have 16 possible interrupts. There are eight
5 * possible level sensitive interrupts assigned and generated internally
6 * from such devices as CPM, PCMCIA, RTC, PIT, TimeBase and Decrementer.
7 * There are eight external interrupts (IRQs) that can be configured
8 * as either level or edge sensitive.
10 * On some implementations, there is also the possibility of an 8259
11 * through the PCI and PCI-ISA bridges.
13 * We don't support the 8259 (yet).
15 #define NR_SIU_INTS 16
16 #define NR_8259_INTS 0
18 #define NR_IRQS (NR_SIU_INTS + NR_8259_INTS)
20 /* These values must be zero-based and map 1:1 with the SIU configuration.
21 * They are used throughout the 8xx I/O subsystem to generate
22 * interrupt masks, flags, and other control patterns. This is why the
23 * current kernel assumption of the 8259 as the base controller is such
26 #define SIU_IRQ0 (0) /* Highest priority */
27 #define SIU_LEVEL0 (1)
29 #define SIU_LEVEL1 (3)
31 #define SIU_LEVEL2 (5)
33 #define SIU_LEVEL3 (7)
35 #define SIU_LEVEL4 (9)
37 #define SIU_LEVEL5 (11)
39 #define SIU_LEVEL6 (13)
41 #define SIU_LEVEL7 (15)
43 /* The internal interrupts we can configure as we see fit.
44 * My personal preference is CPM at level 2, which puts it above the
45 * MBX PCI/ISA/IDE interrupts.
48 #ifdef CONFIG_SYS_CPM_INTERRUPT
49 # define CPM_INTERRUPT CONFIG_SYS_CPM_INTERRUPT
51 # define CPM_INTERRUPT SIU_LEVEL2
54 /* Some internal interrupt registers use an 8-bit mask for the interrupt
55 * level instead of a number.
57 #define mk_int_int_mask(IL) (1 << (7 - (IL/2)))
59 #endif /* _MPC8XX_IRQ_H */