diff options
author | marcel <marcel@FreeBSD.org> | 2011-01-29 20:25:20 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2011-01-29 20:25:20 +0000 |
commit | 97b823bf5155b2981e4e9fe4c49f8f6e3cca5c14 (patch) | |
tree | d03a36ea0a29d440548e1e2e9cf2e2a7aec992aa /sys/dev/fdt/fdt_common.c | |
parent | 181e76925b50ce041a6d66c7cd4ae9ab59f899fe (diff) | |
download | FreeBSD-src-97b823bf5155b2981e4e9fe4c49f8f6e3cca5c14.zip FreeBSD-src-97b823bf5155b2981e4e9fe4c49f8f6e3cca5c14.tar.gz |
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.
Diffstat (limited to 'sys/dev/fdt/fdt_common.c')
-rw-r--r-- | sys/dev/fdt/fdt_common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c index b4e0063..d25715b 100644 --- a/sys/dev/fdt/fdt_common.c +++ b/sys/dev/fdt/fdt_common.c @@ -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: |