Date: Thu, 24 Oct 2013 21:49:23 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257075 - head/sys/dev/ofw Message-ID: <201310242149.r9OLnNUv050922@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Thu Oct 24 21:49:23 2013 New Revision: 257075 URL: http://svnweb.freebsd.org/changeset/base/257075 Log: 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. Modified: head/sys/dev/ofw/ofw_nexus.c Modified: head/sys/dev/ofw/ofw_nexus.c ============================================================================== --- head/sys/dev/ofw/ofw_nexus.c Thu Oct 24 21:43:46 2013 (r257074) +++ head/sys/dev/ofw/ofw_nexus.c Thu Oct 24 21:49:23 2013 (r257075) @@ -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); + 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); + 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, devic 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310242149.r9OLnNUv050922>