From 66a79ac95d028683db9065cc84c9204dcca7e707 Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Sat, 8 May 2004 13:53:47 +0000 Subject: - 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 --- sys/sparc64/isa/isa.c | 43 +++++++++---------------------------------- sys/sparc64/isa/ofw_isa.c | 5 ----- sys/sparc64/isa/ofw_isa.h | 16 ---------------- 3 files changed, 9 insertions(+), 55 deletions(-) (limited to 'sys/sparc64/isa') diff --git a/sys/sparc64/isa/isa.c b/sys/sparc64/isa/isa.c index 6779150fa635..a8b440a400c8 100644 --- a/sys/sparc64/isa/isa.c +++ b/sys/sparc64/isa/isa.c @@ -29,33 +29,25 @@ * $FreeBSD$ */ -#include "opt_ofw_pci.h" - #include #include -#include -#include #include + #include -#include -#include + #include -#include #include #include #include -#include -#include - -#include #include -#include -#include #include +#include +#include + #include #include @@ -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 c6cff5253441..362f1bd5e811 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 #include #include #include -#include #include #include @@ -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 ab119eeb0787..5e74efeb9b40 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_ */ -- cgit v1.2.3