summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2004-02-04 12:50:47 +0000
committergrehan <grehan@FreeBSD.org>2004-02-04 12:50:47 +0000
commite0e0aca56a0a2ae4b2ced6313e1c437d2d6b6c37 (patch)
tree9b7cb89d027454d9caf1ce797e1d091a20348804 /sys
parent0999d17b26f625b52a275c57ed7409f446bd48ef (diff)
downloadFreeBSD-src-e0e0aca56a0a2ae4b2ced6313e1c437d2d6b6c37.zip
FreeBSD-src-e0e0aca56a0a2ae4b2ced6313e1c437d2d6b6c37.tar.gz
Allow child devices to set the OpenFirmware device node ivar
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/aim/nexus.c7
-rw-r--r--sys/powerpc/powerpc/nexus.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/powerpc/aim/nexus.c b/sys/powerpc/aim/nexus.c
index 836c08e..9ca14a7 100644
--- a/sys/powerpc/aim/nexus.c
+++ b/sys/powerpc/aim/nexus.c
@@ -269,11 +269,14 @@ nexus_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
return (ENOENT);
switch (which) {
- case NEXUS_IVAR_NODE:
case NEXUS_IVAR_NAME:
return (EINVAL);
- /* Identified devices will want to set this */
+ /* Identified devices may want to set these */
+ case NEXUS_IVAR_NODE:
+ dinfo->ndi_node = (phandle_t)value;
+ break;
+
case NEXUS_IVAR_DEVICE_TYPE:
dinfo->ndi_device_type = (char *)value;
break;
diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c
index 836c08e..9ca14a7 100644
--- a/sys/powerpc/powerpc/nexus.c
+++ b/sys/powerpc/powerpc/nexus.c
@@ -269,11 +269,14 @@ nexus_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
return (ENOENT);
switch (which) {
- case NEXUS_IVAR_NODE:
case NEXUS_IVAR_NAME:
return (EINVAL);
- /* Identified devices will want to set this */
+ /* Identified devices may want to set these */
+ case NEXUS_IVAR_NODE:
+ dinfo->ndi_node = (phandle_t)value;
+ break;
+
case NEXUS_IVAR_DEVICE_TYPE:
dinfo->ndi_device_type = (char *)value;
break;
OpenPOWER on IntegriCloud