From 51d163d3e91cbf4fe782352c88c0dc6f37015b47 Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Tue, 14 Oct 2008 14:54:14 +0000 Subject: 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 --- sys/dev/powermac_nvram/powermac_nvram.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/powermac_nvram/powermac_nvram.c b/sys/dev/powermac_nvram/powermac_nvram.c index a22c7abead8f..a55fcae8a1e1 100644 --- a/sys/dev/powermac_nvram/powermac_nvram.c +++ b/sys/dev/powermac_nvram/powermac_nvram.c @@ -35,17 +35,15 @@ #include #include -#include +#include #include #include -#include #include #include #include -#include #include #include @@ -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) -- cgit v1.3