aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2014-09-17 18:55:39 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2014-09-17 18:55:39 +0000
commit1f895058e428d52b1d16111b6abffe1719b21be5 (patch)
tree8f559561062b10e151049d8ebcfc678632e32df5 /sys/sparc64
parent490356e5b7b6af01533e5259ebfc557e64b9caab (diff)
downloadsrc-1f895058e428d52b1d16111b6abffe1719b21be5.tar.gz
src-1f895058e428d52b1d16111b6abffe1719b21be5.zip
Revert unrelated changes accidentally committed in r271192.
Notes
Notes: svn path=/head/; revision=271717
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/pci/psycho.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c
index cd04f2899735..57e0f4817b5a 100644
--- a/sys/sparc64/pci/psycho.c
+++ b/sys/sparc64/pci/psycho.c
@@ -448,30 +448,24 @@ psycho_attach(device_t dev)
i = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range);
/*
+ * Make sure that the expected ranges are present. The
+ * OFW_PCI_CS_MEM64 one is not currently used though.
+ */
+ if (i != PSYCHO_NRANGE)
+ panic("%s: unsupported number of ranges", __func__);
+ /*
* Find the addresses of the various bus spaces.
* There should not be multiple ones of one kind.
* The physical start addresses of the ranges are the configuration,
* memory and I/O handles.
*/
- for (; i >= 0; i--) {
+ for (i = 0; i < PSYCHO_NRANGE; i++) {
j = OFW_PCI_RANGE_CS(&range[i]);
if (sc->sc_pci_bh[j] != 0)
panic("%s: duplicate range for space %d",
__func__, j);
sc->sc_pci_bh[j] = OFW_PCI_RANGE_PHYS(&range[i]);
}
-
- /*
- * Make sure that the expected ranges are present. The
- * OFW_PCI_CS_MEM64 one is not currently used.
- */
- if (sc->sc_pci_bh[OFW_PCI_CS_CONFIG] == 0)
- panic("%s: missing CONFIG range", __func__);
- if (sc->sc_pci_bh[OFW_PCI_CS_IO] == 0)
- panic("%s: missing IO range", __func__);
- if (sc->sc_pci_bh[OFW_PCI_CS_MEM32] == 0)
- panic("%s: missing MEM32 range", __func__);
-
free(range, M_OFWPROP);
/* Register the softc, this is needed for paired Psychos. */