FreeBSD Bugzilla – Attachment 77444 Details for
Bug 111522
Add support for the ofw bus interface to nexus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ppc-nexus-ofwbus.diff
ppc-nexus-ofwbus.diff (text/plain), 2.01 KB, created by
Andrew Turner
on 2007-04-13 00:10:04 UTC
(
hide
)
Description:
ppc-nexus-ofwbus.diff
Filename:
MIME Type:
Creator:
Andrew Turner
Created:
2007-04-13 00:10:04 UTC
Size:
2.01 KB
patch
obsolete
>Index: sys/powerpc/powerpc/nexus.c >=================================================================== >RCS file: /cvsroot/src/sys/powerpc/powerpc/nexus.c,v >retrieving revision 1.13 >diff -u -u -r1.13 nexus.c >--- sys/powerpc/powerpc/nexus.c 7 Mar 2007 11:42:14 -0000 1.13 >+++ sys/powerpc/powerpc/nexus.c 12 Apr 2007 10:29:35 -0000 >@@ -74,6 +74,7 @@ > > #include <sys/rman.h> > >+#include "ofw_bus_if.h" > #include "pic_if.h" > > /* >@@ -124,6 +125,11 @@ > static int nexus_release_resource(device_t, device_t, int, int, > struct resource *); > >+static phandle_t nexus_ofw_get_node(device_t, device_t); >+static const char *nexus_ofw_get_name(device_t, device_t); >+static const char *nexus_ofw_get_type(device_t, device_t); >+static const char *nexus_ofw_get_compat(device_t, device_t); >+ > /* > * Local routines > */ >@@ -151,6 +157,12 @@ > DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), > DEVMETHOD(bus_release_resource, nexus_release_resource), > >+ /* OFW bus interface */ >+ DEVMETHOD(ofw_bus_get_node, nexus_ofw_get_node), >+ DEVMETHOD(ofw_bus_get_name, nexus_ofw_get_name), >+ DEVMETHOD(ofw_bus_get_type, nexus_ofw_get_type), >+ DEVMETHOD(ofw_bus_get_compat, nexus_ofw_get_compat), >+ > { 0, 0 } > }; > >@@ -416,3 +428,47 @@ > > return (0); > } >+ >+static const char * >+nexus_ofw_get_name(device_t bus, device_t dev) >+{ >+ struct nexus_devinfo *dinfo; >+ >+ if ((dinfo = device_get_ivars(dev)) == 0) >+ return NULL; >+ >+ return dinfo->ndi_name; >+} >+ >+static phandle_t >+nexus_ofw_get_node(device_t bus, device_t dev) >+{ >+ struct nexus_devinfo *dinfo; >+ >+ if ((dinfo = device_get_ivars(dev)) == 0) >+ return 0; >+ >+ return dinfo->ndi_node; >+} >+ >+static const char * >+nexus_ofw_get_type(device_t bus, device_t dev) >+{ >+ struct nexus_devinfo *dinfo; >+ >+ if ((dinfo = device_get_ivars(dev)) == 0) >+ return NULL; >+ >+ return dinfo->ndi_device_type; >+} >+ >+static const char * >+nexus_ofw_get_compat(device_t bus, device_t dev) >+{ >+ struct nexus_devinfo *dinfo; >+ >+ if ((dinfo = device_get_ivars(dev)) == 0) >+ return NULL; >+ >+ return dinfo->ndi_compatible; >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 111522
: 77444 |
77445