summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2004-02-03 08:00:37 +0000
committergrehan <grehan@FreeBSD.org>2004-02-03 08:00:37 +0000
commitfd93cf8ef3f8dda8f287b6ce7ec3aa953f381fdb (patch)
tree8618a2326006e957b8e4692ef701ad89d15e9cc3 /sys
parentcad15737622d98f9856734b12f32c68a09608bad (diff)
downloadFreeBSD-src-fd93cf8ef3f8dda8f287b6ce7ec3aa953f381fdb.zip
FreeBSD-src-fd93cf8ef3f8dda8f287b6ce7ec3aa953f381fdb.tar.gz
Use device alias "mpic" to locate the macio OpenPIC. This works
on the new 12/15/17" PowerBooks that don't have the "interrupt-controller" property underneath "/chosen", which was the previous way of searching.
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/powermac/openpic_macio.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/powerpc/powermac/openpic_macio.c b/sys/powerpc/powermac/openpic_macio.c
index 832a043..7642190 100644
--- a/sys/powerpc/powermac/openpic_macio.c
+++ b/sys/powerpc/powermac/openpic_macio.c
@@ -114,16 +114,15 @@ static void
openpic_ofw_identify(driver_t *driver, device_t parent)
{
device_t child;
- phandle_t chosen, pic;
+ phandle_t pic;
char type[40];
- chosen = OF_finddevice("/chosen");
- if (chosen == -1)
+ pic = OF_finddevice("mpic");
+ if (pic == -1) {
+ printf("could not find mpic!\n");
return;
+ }
- if (OF_getprop(chosen, "interrupt-controller", &pic, 4) != 4)
- return;
-
OF_getprop(pic, "device_type", type, sizeof(type));
if (strcmp(type, "open-pic") != 0)
OpenPOWER on IntegriCloud