aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2013-10-24 21:49:23 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2013-10-24 21:49:23 +0000
commite3f4d74e218aac93c75e0083d676f3f3a4b7917e (patch)
treef40f23b2d00449b66347109873da9e6c9d0fbb63 /sys
parentc54a713f6a2337b7f60b3dbb220a22a51d254834 (diff)
downloadsrc-e3f4d74e218aac93c75e0083d676f3f3a4b7917e.tar.gz
src-e3f4d74e218aac93c75e0083d676f3f3a4b7917e.zip
Remove some of the code required for supporting ssm(4) on SPARC in favor
of a more PowerPC/FDT-focused design. Whenever SPARC64 is integrated into this rework, this should be (trivially) revisited.
Notes
Notes: svn path=/head/; revision=257075
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ofw/ofw_nexus.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/sys/dev/ofw/ofw_nexus.c b/sys/dev/ofw/ofw_nexus.c
index 8a88c1f570dd..e531311fb899 100644
--- a/sys/dev/ofw/ofw_nexus.c
+++ b/sys/dev/ofw/ofw_nexus.c
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
#include <dev/ofw/openfirm.h>
#include <machine/bus.h>
-#include <machine/intr_machdep.h>
#include <machine/resource.h>
/*
@@ -188,21 +187,17 @@ nexus_attach(device_t dev)
sc = device_get_softc(dev);
- if (strcmp(device_get_name(device_get_parent(dev)), "root") == 0) {
- node = OF_peer(0);
-
- sc->sc_intr_rman.rm_type = RMAN_ARRAY;
- sc->sc_intr_rman.rm_descr = "Interrupts";
- sc->sc_mem_rman.rm_type = RMAN_ARRAY;
- sc->sc_mem_rman.rm_descr = "Device Memory";
- if (rman_init(&sc->sc_intr_rman) != 0 ||
- rman_init(&sc->sc_mem_rman) != 0 ||
- rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0 ||
- rman_manage_region(&sc->sc_mem_rman, 0, BUS_SPACE_MAXADDR)
- != 0)
- panic("%s: failed to set up rmans.", __func__);
- } else
- node = ofw_bus_get_node(dev);
+ node = OF_peer(0);
+
+ sc->sc_intr_rman.rm_type = RMAN_ARRAY;
+ sc->sc_intr_rman.rm_descr = "Interrupts";
+ sc->sc_mem_rman.rm_type = RMAN_ARRAY;
+ sc->sc_mem_rman.rm_descr = "Device Memory";
+ if (rman_init(&sc->sc_intr_rman) != 0 ||
+ rman_init(&sc->sc_mem_rman) != 0 ||
+ rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0 ||
+ rman_manage_region(&sc->sc_mem_rman, 0, BUS_SPACE_MAXADDR) != 0)
+ panic("%s: failed to set up rmans.", __func__);
/*
* Allow devices to identify.
@@ -296,15 +291,11 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid,
struct rman *rm;
struct resource *rv;
struct resource_list_entry *rle;
- device_t nexus;
int isdefault, passthrough;
isdefault = (start == 0UL && end == ~0UL);
passthrough = (device_get_parent(child) != bus);
- nexus = bus;
- while (strcmp(device_get_name(device_get_parent(nexus)), "root") != 0)
- nexus = device_get_parent(nexus);
- sc = device_get_softc(nexus);
+ sc = device_get_softc(bus);
rle = NULL;
if (!passthrough && isdefault) {