diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2013-09-15 14:19:17 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2013-09-15 14:19:17 +0000 |
commit | c088841850a3cf9119a942bab99c3ae2bf723911 (patch) | |
tree | fe3ff164532f1f65b1e3f0ea2a314284c1f99fe8 /sys/powerpc/ofw | |
parent | c775ab573d1384fa8598eb48b06aa63f0d6aab20 (diff) | |
download | src-c088841850a3cf9119a942bab99c3ae2bf723911.tar.gz src-c088841850a3cf9119a942bab99c3ae2bf723911.zip |
Add a kernel interface (OF_xref_phandle()) for systems where phandles
used as cross-references in the device tree and phandles as used by the
Open Firmware client interface are in different namespaces. This include
IBM pSeries hardware as well as FDT systems. FDT certainly abuses
ihandles for this purpose and should be modified to use this API
eventually. This changes no behavior on systems where FreeBSD already
worked.
Reviewed by: marius
Approved by: re (kib)
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=255596
Diffstat (limited to 'sys/powerpc/ofw')
-rw-r--r-- | sys/powerpc/ofw/ofw_pcibus.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/powerpc/ofw/ofw_pcibus.c b/sys/powerpc/ofw/ofw_pcibus.c index c3dfed00b937..a714b6e6243e 100644 --- a/sys/powerpc/ofw/ofw_pcibus.c +++ b/sys/powerpc/ofw/ofw_pcibus.c @@ -210,11 +210,12 @@ ofw_pcibus_enum_devtree(device_t dev, u_int domain, u_int busno) icells = 1; OF_getprop(child, "interrupt-parent", &iparent, sizeof(iparent)); - OF_getprop(iparent, "#interrupt-cells", &icells, - sizeof(icells)); - - if (iparent != 0) + if (iparent != 0) { + OF_getprop(OF_xref_phandle(iparent), + "#interrupt-cells", &icells, + sizeof(icells)); intr[0] = MAP_IRQ(iparent, intr[0]); + } if (iparent != 0 && icells > 1) { powerpc_config_intr(intr[0], |