diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2008-10-14 14:54:14 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2008-10-14 14:54:14 +0000 |
commit | 0d091e41decf056612b1d6a8280ab6401f861f54 (patch) | |
tree | c6f1268aba033a8e59745da49122a0eae51600b2 /sys/dev/powermac_nvram/powermac_nvram.c | |
parent | e1d3902c1d1d293d29f200516564bb6a8b9acca9 (diff) | |
download | FreeBSD-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/dev/powermac_nvram/powermac_nvram.c')
-rw-r--r-- | sys/dev/powermac_nvram/powermac_nvram.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/powermac_nvram/powermac_nvram.c b/sys/dev/powermac_nvram/powermac_nvram.c index a22c7ab..a55fcae 100644 --- a/sys/dev/powermac_nvram/powermac_nvram.c +++ b/sys/dev/powermac_nvram/powermac_nvram.c @@ -35,17 +35,15 @@ #include <sys/uio.h> #include <dev/ofw/openfirm.h> -#include <dev/ofw/ofw_pci.h> +#include <dev/ofw/ofw_bus.h> #include <machine/bus.h> #include <machine/md_var.h> -#include <machine/nexusvar.h> #include <machine/pio.h> #include <machine/resource.h> #include <sys/rman.h> -#include <powerpc/ofw/ofw_pci.h> #include <dev/powermac_nvram/powermac_nvramvar.h> #include <vm/vm.h> @@ -113,10 +111,10 @@ static struct cdevsw powermac_nvram_cdevsw = { static int powermac_nvram_probe(device_t dev) { - char *type, *compatible; + const char *type, *compatible; - type = nexus_get_device_type(dev); - compatible = nexus_get_compatible(dev); + type = ofw_bus_get_type(dev); + compatible = ofw_bus_get_compat(dev); if (type == NULL || compatible == NULL) return ENXIO; @@ -136,7 +134,7 @@ powermac_nvram_attach(device_t dev) u_int32_t reg[2]; int gen0, gen1; - node = nexus_get_node(dev); + node = ofw_bus_get_node(dev); sc = device_get_softc(dev); if (OF_getprop(node, "reg", reg, sizeof(reg)) < 8) |