summaryrefslogtreecommitdiffstats
path: root/sys/sun4v
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2007-01-18 13:52:44 +0000
committermarius <marius@FreeBSD.org>2007-01-18 13:52:44 +0000
commit52099a4877411d2bc0a06d7c071d7bc464d9cd13 (patch)
tree71ac6785ddff180620abf3962fda0ccb2e8b23d7 /sys/sun4v
parent85c3e6d089a47ffbf7d2b8bd714fe07527f3667b (diff)
downloadFreeBSD-src-52099a4877411d2bc0a06d7c071d7bc464d9cd13.zip
FreeBSD-src-52099a4877411d2bc0a06d7c071d7bc464d9cd13.tar.gz
Remove the compat shims for the ISA old-stlye in{b,w,l}()/out{b,w,l}()
and friends along with all hacks required to implement them. None of the drivers currently built (as part of GENERIC, LINT or modules) on sparc64 or sun4v and none of those we might want to use there in future uses them, AFAICT there actually never was a driver hooked up to the sparc64 or sun4v build that correctly used these functions (and it looks like that due to a bug read{b,w,l}()/write{b,w,l}() and the other functions working on a memory handle never actually worked on sun4v). All they ever were good for on sparc64 and sun4v was erroneously dragging in dependencies on isa(4) in drivers like f.e. dpt(4), si(4) and syscons(4) in source files that supposedly were bus-neutral and hiding issues with drivers like f.e. ng_bt3c(4) that used these functions with busses other than isa(4) and therefore couldn't work on these platforms.
Diffstat (limited to 'sys/sun4v')
-rw-r--r--sys/sun4v/include/bus.h53
-rw-r--r--sys/sun4v/sun4v/hv_pci.c28
2 files changed, 0 insertions, 81 deletions
diff --git a/sys/sun4v/include/bus.h b/sys/sun4v/include/bus.h
index 8a30082..f74dcf4 100644
--- a/sys/sun4v/include/bus.h
+++ b/sys/sun4v/include/bus.h
@@ -837,59 +837,6 @@ bus_space_copy_region_stream_8(bus_space_tag_t t, bus_space_handle_t h1,
bus_space_write_stream_8(t, h1, o1, bus_space_read_8(t, h2, o2));
}
-/* Back-compat functions for old ISA drivers */
-extern bus_space_tag_t isa_io_bt;
-extern bus_space_handle_t isa_io_hdl;
-extern bus_space_tag_t isa_mem_bt;
-extern bus_space_handle_t isa_mem_hdl;
-
-#define inb(o) bus_space_read_1(isa_io_bt, isa_io_hdl, o)
-#define inw(o) bus_space_read_2(isa_io_bt, isa_io_hdl, o)
-#define inl(o) bus_space_read_4(isa_io_bt, isa_io_hdl, o)
-#define outb(o, v) bus_space_write_1(isa_io_bt, isa_io_hdl, o, v)
-#define outw(o, v) bus_space_write_2(isa_io_bt, isa_io_hdl, o, v)
-#define outl(o, v) bus_space_write_4(isa_io_bt, isa_io_hdl, o, v)
-
-#define readb(o) bus_space_read_1(isa_mem_bt, isa_mem_hdl, o)
-#define readw(o) bus_space_read_2(isa_mem_bt, isa_mem_hdl, o)
-#define readl(o) bus_space_read_4(isa_mem_bt, isa_mem_hdl, o)
-#define writeb(o, v) bus_space_write_1(isa_mem_bt, isa_mem_hdl, o, v)
-#define writew(o, v) bus_space_write_2(isa_mem_bt, isa_mem_hdl, o, v)
-#define writel(o, v) bus_space_write_4(isa_mem_bt, isa_mem_hdl, o, v)
-
-#define insb(o, a, c) \
- bus_space_read_multi_1(isa_io_bt, isa_io_hdl, o, (void*)a, c)
-#define insw(o, a, c) \
- bus_space_read_multi_2(isa_io_bt, isa_io_hdl, o, (void*)a, c)
-#define insl(o, a, c) \
- bus_space_read_multi_4(isa_io_bt, isa_io_hdl, o, (void*)a, c)
-#define outsb(o, a, c) \
- bus_space_write_multi_1(isa_io_bt, isa_io_hdl, o, (void*)a, c)
-#define outsw(o, a, c) \
- bus_space_write_multi_2(isa_io_bt, isa_io_hdl, o, (void*)a, c)
-#define outsl(o, a, c) \
- bus_space_write_multi_4(isa_io_bt, isa_io_hdl, o, (void*)a, c)
-
-#define memcpy_fromio(d, s, c) \
- bus_space_read_region_1(isa_mem_bt, isa_mem_hdl, s, d, c)
-#define memcpy_toio(d, s, c) \
- bus_space_write_region_1(isa_mem_bt, isa_mem_hdl, d, s, c)
-#define memcpy_io(d, s, c) \
- bus_space_copy_region_1(isa_mem_bt, isa_mem_hdl, s, isa_mem_hdl, d, c)
-#define memset_io(d, v, c) \
- bus_space_set_region_1(isa_mem_bt, isa_mem_hdl, d, v, c)
-#define memsetw_io(d, v, c) \
- bus_space_set_region_2(isa_mem_bt, isa_mem_hdl, d, v, c)
-
-static __inline void
-memsetw(void *d, int val, size_t size)
-{
- u_int16_t *sp = d;
-
- while (size--)
- *sp++ = val;
-}
-
#include <machine/bus_dma.h>
#endif /* !_MACHINE_BUS_H_ */
diff --git a/sys/sun4v/sun4v/hv_pci.c b/sys/sun4v/sun4v/hv_pci.c
index 3e68abf2..6f2073f 100644
--- a/sys/sun4v/sun4v/hv_pci.c
+++ b/sys/sun4v/sun4v/hv_pci.c
@@ -86,7 +86,6 @@ static pcib_write_config_t hvpci_write_config;
static pcib_route_interrupt_t hvpci_route_interrupt;
static ofw_bus_get_node_t hvpci_get_node;
static ofw_pci_intr_pending_t hvpci_intr_pending;
-static ofw_pci_get_bus_handle_t hvpci_get_bus_handle;
static device_method_t hv_pcib_methods[] = {
/* Device interface */
@@ -119,7 +118,6 @@ static device_method_t hv_pcib_methods[] = {
/* ofw_pci interface */
DEVMETHOD(ofw_pci_intr_pending, hvpci_intr_pending),
- DEVMETHOD(ofw_pci_get_bus_handle, hvpci_get_bus_handle),
{ 0, 0 }
};
@@ -365,32 +363,6 @@ hvpci_intr_pending(device_t dev, ofw_pci_intr_t intr)
panic("unimplemnted");
}
-static bus_space_handle_t
-hvpci_get_bus_handle(device_t dev, int type, bus_space_handle_t childhdl,
- bus_space_tag_t *tag)
-{
- struct hvpci_softc *sc;
-
- sc = device_get_softc(dev);
- switch (type) {
- case SYS_RES_IOPORT:
- *tag = sc->hs_pci_iot;
-#ifdef DEBUG
- printf("io handle: %#lx\n", sc->hs_pci_ioh + childhdl);
-#endif
- return (sc->hs_pci_ioh + childhdl);
- break;
-
- case SYS_RES_MEMORY:
- *tag = sc->hs_pci_memt;
- return (sc->hs_pci_ioh + childhdl);
- break;
-
- default:
- panic("%s: illegal space (%d)", __func__, type);
- }
-}
-
static int
hvpci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
{
OpenPOWER on IntegriCloud