From 9960916dbbbc0aff643cdfff26aece7bbcb1f906 Mon Sep 17 00:00:00 2001 From: Peter Grehan Date: Wed, 4 Feb 2004 12:50:47 +0000 Subject: [PATCH] Allow child devices to set the OpenFirmware device node ivar --- sys/powerpc/aim/nexus.c | 7 +++++-- sys/powerpc/powerpc/nexus.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/powerpc/aim/nexus.c b/sys/powerpc/aim/nexus.c index 836c08e03fe..9ca14a787c3 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 836c08e03fe..9ca14a787c3 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;