summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/psim
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2008-10-14 14:54:14 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2008-10-14 14:54:14 +0000
commit0d091e41decf056612b1d6a8280ab6401f861f54 (patch)
treec6f1268aba033a8e59745da49122a0eae51600b2 /sys/powerpc/psim
parente1d3902c1d1d293d29f200516564bb6a8b9acca9 (diff)
downloadFreeBSD-src-0d091e41decf056612b1d6a8280ab6401f861f54.zip
FreeBSD-src-0d091e41decf056612b1d6a8280ab6401f861f54.tar.gz
Convert PowerPC AIM PCI and nexus busses to standard OFW bus interface. This
simplifies certain device attachments (Kauai ATA, for instance), and makes possible others on new hardware. On G5 systems, there are several otherwise standard PCI devices (Serverworks SATA) that will not allow their interrupt properties to be written, so this information must be supplied directly from Open Firmware. Obtained from: sparc64
Diffstat (limited to 'sys/powerpc/psim')
-rw-r--r--sys/powerpc/psim/iobus.c6
-rw-r--r--sys/powerpc/psim/openpic_iobus.c1
2 files changed, 3 insertions, 4 deletions
diff --git a/sys/powerpc/psim/iobus.c b/sys/powerpc/psim/iobus.c
index 7c51f8c..6ed8cd3 100644
--- a/sys/powerpc/psim/iobus.c
+++ b/sys/powerpc/psim/iobus.c
@@ -44,6 +44,7 @@
#include <machine/bus.h>
#include <sys/rman.h>
+#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/openfirm.h>
#include <machine/vmparam.h>
@@ -52,7 +53,6 @@
#include <machine/pmap.h>
#include <machine/resource.h>
-#include <machine/nexusvar.h>
#include <powerpc/psim/iobusvar.h>
@@ -121,7 +121,7 @@ DRIVER_MODULE(iobus, nexus, iobus_driver, iobus_devclass, 0, 0);
static int
iobus_probe(device_t dev)
{
- char *type = nexus_get_name(dev);
+ const char *type = ofw_bus_get_name(dev);
if (strcmp(type, "psim-iobus") != 0)
return (ENXIO);
@@ -190,7 +190,7 @@ iobus_attach(device_t dev)
int size;
sc = device_get_softc(dev);
- sc->sc_node = nexus_get_node(dev);
+ sc->sc_node = ofw_bus_get_node(dev);
/*
* Find the base addr/size of the iobus, and initialize the
diff --git a/sys/powerpc/psim/openpic_iobus.c b/sys/powerpc/psim/openpic_iobus.c
index 0a1574e..7a95b1b 100644
--- a/sys/powerpc/psim/openpic_iobus.c
+++ b/sys/powerpc/psim/openpic_iobus.c
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
#include <machine/intr.h>
#include <machine/intr_machdep.h>
#include <machine/md_var.h>
-#include <machine/nexusvar.h>
#include <machine/pio.h>
#include <machine/resource.h>
OpenPOWER on IntegriCloud