summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/isa
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2004-05-08 13:53:47 +0000
committermarius <marius@FreeBSD.org>2004-05-08 13:53:47 +0000
commitbc0d53456e34dc72ed85a47b0adfc7133ff1cd80 (patch)
tree64a67df6eb8ceed88df33d5510a5cd9bf18f9cd2 /sys/sparc64/isa
parent98d03d5d0690372d41c78603cbbc4dd69efb8b86 (diff)
downloadFreeBSD-src-bc0d53456e34dc72ed85a47b0adfc7133ff1cd80.zip
FreeBSD-src-bc0d53456e34dc72ed85a47b0adfc7133ff1cd80.tar.gz
- Remove the old sparc64 OFW PCI code (as opposed to the former
"options OFW_NEWPCI"). This is a bit overdue, the new sparc64 OFW PCI code which is meant to replace the old one is in place for 10 months and enabled by default in GENERIC for 8 months. FreeBSD 5.2 and 5.2.1 also shipped with the new code enabled by default. - Some minor clean-up, e.g. remove functions that encapsulated the #ifdefs for OFW_NEWPCI, remove unused resp. no longer required includes, etc. Approved by: tmm, no objections on freebsd-sparc64
Diffstat (limited to 'sys/sparc64/isa')
-rw-r--r--sys/sparc64/isa/isa.c43
-rw-r--r--sys/sparc64/isa/ofw_isa.c5
-rw-r--r--sys/sparc64/isa/ofw_isa.h16
3 files changed, 9 insertions, 55 deletions
diff --git a/sys/sparc64/isa/isa.c b/sys/sparc64/isa/isa.c
index 6779150..a8b440a 100644
--- a/sys/sparc64/isa/isa.c
+++ b/sys/sparc64/isa/isa.c
@@ -29,33 +29,25 @@
* $FreeBSD$
*/
-#include "opt_ofw_pci.h"
-
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
#include <sys/bus.h>
+
#include <machine/bus.h>
-#include <sys/malloc.h>
-#include <sys/proc.h>
+
#include <sys/rman.h>
-#include <sys/interrupt.h>
#include <isa/isareg.h>
#include <isa/isavar.h>
#include <isa/isa_common.h>
-#include <dev/pci/pcireg.h>
-#include <dev/pci/pcivar.h>
-
-#include <dev/ofw/ofw_pci.h>
#include <dev/ofw/openfirm.h>
-#include <machine/intr_machdep.h>
-#include <machine/ofw_bus.h>
#include <machine/resource.h>
+#include <dev/pci/pcireg.h>
+#include <dev/pci/pcivar.h>
+
#include <sparc64/pci/ofw_pci.h>
#include <sparc64/isa/ofw_isa.h>
@@ -65,19 +57,16 @@ bus_space_handle_t isa_io_hdl;
bus_space_tag_t isa_mem_bt = NULL;
bus_space_handle_t isa_mem_hdl;
-u_int64_t isa_io_base;
-u_int64_t isa_io_limit;
-u_int64_t isa_mem_base;
-u_int64_t isa_mem_limit;
+static u_int64_t isa_io_base;
+static u_int64_t isa_io_limit;
+static u_int64_t isa_mem_base;
+static u_int64_t isa_mem_limit;
device_t isa_bus_device;
static phandle_t isab_node;
static ofw_pci_intr_t isa_ino[8];
-
-#ifdef OFW_NEWPCI
struct ofw_bus_iinfo isa_iinfo;
-#endif
/*
* XXX: This is really partly partly PCI-specific, but unfortunately is
@@ -117,26 +106,17 @@ isa_init(device_t dev)
device_t bridge;
phandle_t node;
ofw_isa_intr_t ino;
-#ifndef OFW_NEWPCI
- ofw_pci_intr_t rino;
-#endif
struct isa_ranges *br;
int nbr, i;
/* The parent of the bus must be a PCI-ISA bridge. */
bridge = device_get_parent(dev);
-#ifdef OFW_NEWPCI
isab_node = ofw_pci_get_node(bridge);
-#else
- isab_node = ofw_pci_node(bridge);
-#endif
nbr = OF_getprop_alloc(isab_node, "ranges", sizeof(*br), (void **)&br);
if (nbr <= 0)
panic("isa_init: cannot get bridge range property");
-#ifdef OFW_NEWPCI
ofw_bus_setup_iinfo(isab_node, &isa_iinfo, sizeof(ofw_isa_intr_t));
-#endif
/*
* This is really a bad kludge; however, it is needed to provide
@@ -150,13 +130,8 @@ isa_init(device_t dev)
continue;
if (ino > 7)
panic("isa_init: XXX: ino too large");
-#ifdef OFW_NEWPCI
isa_ino[ino] = ofw_isa_route_intr(bridge, node, &isa_iinfo,
ino);
-#else
- rino = ofw_bus_route_intr(node, ino, ofw_pci_orb_callback, dev);
- isa_ino[ino] = rino == ORIR_NOTFOUND ? PCI_INVALID_IRQ : rino;
-#endif
}
for (nbr -= 1; nbr >= 0; nbr--) {
diff --git a/sys/sparc64/isa/ofw_isa.c b/sys/sparc64/isa/ofw_isa.c
index c6cff52..362f1bd 100644
--- a/sys/sparc64/isa/ofw_isa.c
+++ b/sys/sparc64/isa/ofw_isa.c
@@ -35,14 +35,11 @@
* Helper functions which can be used in both ISA and EBus code.
*/
-#include "opt_ofw_pci.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <dev/ofw/openfirm.h>
-#include <dev/ofw/ofw_pci.h>
#include <machine/bus.h>
#include <machine/resource.h>
@@ -100,7 +97,6 @@ ofw_isa_range_map(struct isa_ranges *range, int nrange, u_long *start,
*start, *end);
}
-#ifdef OFW_NEWPCI
ofw_pci_intr_t
ofw_isa_route_intr(device_t bridge, phandle_t node, struct ofw_bus_iinfo *ii,
ofw_isa_intr_t intr)
@@ -122,4 +118,3 @@ ofw_isa_route_intr(device_t bridge, phandle_t node, struct ofw_bus_iinfo *ii,
}
return (mintr);
}
-#endif /* OFW_NEWPCI */
diff --git a/sys/sparc64/isa/ofw_isa.h b/sys/sparc64/isa/ofw_isa.h
index ab119ee..5e74efe 100644
--- a/sys/sparc64/isa/ofw_isa.h
+++ b/sys/sparc64/isa/ofw_isa.h
@@ -64,27 +64,11 @@ struct isa_ranges {
typedef u_int32_t ofw_isa_intr_t;
-struct isa_imap {
- u_int32_t phys_hi; /* high phys addr mask */
- u_int32_t phys_lo; /* low phys addr mask */
- ofw_isa_intr_t intr; /* interrupt mask */
- phandle_t cnode; /* child node */
- ofw_pci_intr_t cintr; /* child interrupt */
-};
-
-struct isa_imap_msk {
- u_int32_t phys_hi; /* high phys addr */
- u_int32_t phys_lo; /* low phys addr */
- ofw_isa_intr_t intr; /* interrupt */
-};
-
int ofw_isa_range_restype(struct isa_ranges *);
/* Map an IO range. Returns the resource type of the range. */
int ofw_isa_range_map(struct isa_ranges *, int, u_long *, u_long *, int *);
-#ifdef OFW_NEWPCI
ofw_pci_intr_t ofw_isa_route_intr(device_t, phandle_t, struct ofw_bus_iinfo *,
ofw_isa_intr_t);
-#endif
#endif /* !_SPARC64_ISA_OFW_ISA_H_ */
OpenPOWER on IntegriCloud