Introduce macro FDT_MAP_IRQ to map from an interrupt controller and
interrupt pin pair to a global IRQ number. When multiple PICs exist on a board, the interrupt pin alone is not unique.
This commit is contained in:
parent
a21779f050
commit
2af3fc178e
@ -44,6 +44,9 @@
|
||||
/* Max interrupt number */
|
||||
#define FDT_INTR_MAX NIRQ
|
||||
|
||||
/* Map phandle/intpin pair to global IRQ number */
|
||||
#define FDT_MAP_IRQ(node, pin) (pin)
|
||||
|
||||
/*
|
||||
* Bus space tag. XXX endianess info needs to be derived from the blob.
|
||||
*/
|
||||
|
@ -480,7 +480,7 @@ fdt_intr_to_rl(phandle_t node, struct resource_list *rl,
|
||||
pcell_t *intr;
|
||||
pcell_t intr_cells;
|
||||
int interrupt, trig, pol;
|
||||
int i, intr_num, rv;
|
||||
int i, intr_num, irq, rv;
|
||||
|
||||
if (OF_getproplen(node, "interrupts") <= 0)
|
||||
/* Node does not have 'interrupts' property. */
|
||||
@ -532,7 +532,8 @@ fdt_intr_to_rl(phandle_t node, struct resource_list *rl,
|
||||
intr_sl[i].trig = trig;
|
||||
intr_sl[i].pol = pol;
|
||||
|
||||
resource_list_add(rl, SYS_RES_IRQ, i, interrupt, interrupt, 1);
|
||||
irq = FDT_MAP_IRQ(intr_par, interrupt);
|
||||
resource_list_add(rl, SYS_RES_IRQ, i, irq, irq, 1);
|
||||
}
|
||||
|
||||
out:
|
||||
|
@ -38,6 +38,9 @@
|
||||
/* Max interrupt number */
|
||||
#define FDT_INTR_MAX INTR_VECTORS
|
||||
|
||||
/* Map phandle/intpin pair to global IRQ number */
|
||||
#define FDT_MAP_IRQ(node, pin) powerpc_get_irq(node, pin)
|
||||
|
||||
/*
|
||||
* Bus space tag. XXX endianess info needs to be derived from the blob.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user