diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2013-11-17 19:50:50 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2013-11-17 19:50:50 +0000 |
commit | 8ec08b0a21c87483b0feca0e50ba328f873ebf6e (patch) | |
tree | c9647b46d7d3be8d79cdcb3106514fb8a73a7de5 /sys/powerpc/powermac | |
parent | 8f02a8aafa0b5de44085eb0da6f471a015c52dba (diff) | |
download | src-8ec08b0a21c87483b0feca0e50ba328f873ebf6e.tar.gz src-8ec08b0a21c87483b0feca0e50ba328f873ebf6e.zip |
#interrupt-cells belongs to the iparent, not the device parent.
Notes
Notes:
svn path=/head/; revision=258274
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 b31cf15394f7..dad261cbbb32 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]); |