diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2013-11-17 19:50:50 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2013-11-17 19:50:50 +0000 |
commit | 9626dd387ed5d10ddcdc12604062f7057a3f0632 (patch) | |
tree | c9647b46d7d3be8d79cdcb3106514fb8a73a7de5 /sys/powerpc/powermac | |
parent | 2c388bda6c46e08781a3a8621d691ade01dae95c (diff) | |
download | FreeBSD-src-9626dd387ed5d10ddcdc12604062f7057a3f0632.zip FreeBSD-src-9626dd387ed5d10ddcdc12604062f7057a3f0632.tar.gz |
#interrupt-cells belongs to the iparent, not the device parent.
Diffstat (limited to 'sys/powerpc/powermac')
-rw-r--r-- | sys/powerpc/powermac/macio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c index b31cf15..dad261c 100644 --- a/sys/powerpc/powermac/macio.c +++ b/sys/powerpc/powermac/macio.c @@ -201,10 +201,6 @@ macio_add_intr(phandle_t devnode, struct macio_devinfo *dinfo) return; } - if (OF_searchprop(devnode, "#interrupt-cells", &icells, sizeof(icells)) - <= 0) - icells = 1; - nintr = OF_getprop_alloc(devnode, "interrupts", sizeof(*intr), (void **)&intr); if (nintr == -1) { @@ -221,6 +217,10 @@ macio_add_intr(phandle_t devnode, struct macio_devinfo *dinfo) <= 0) panic("Interrupt but no interrupt parent!\n"); + if (OF_getprop(OF_xref_phandle(iparent), "#interrupt-cells", &icells, + sizeof(icells)) <= 0) + icells = 1; + for (i = 0; i < nintr; i+=icells) { u_int irq = MAP_IRQ(iparent, intr[i]); |