summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/macppc/include/bus.h9
-rw-r--r--sys/arch/macppc/macppc/machdep.c8
-rw-r--r--sys/arch/macppc/macppc/ofw_machdep.c3
-rw-r--r--sys/arch/macppc/pci/kauaiata.c4
-rw-r--r--sys/arch/macppc/pci/macobio.c4
-rw-r--r--sys/arch/macppc/pci/mpcpcibus.c8
6 files changed, 8 insertions, 28 deletions
diff --git a/sys/arch/macppc/include/bus.h b/sys/arch/macppc/include/bus.h
index c4dd81d2cb8..0e3c3b0637a 100644
--- a/sys/arch/macppc/include/bus.h
+++ b/sys/arch/macppc/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.11 2003/10/08 21:52:46 drahn Exp $ */
+/* $OpenBSD: bus.h,v 1.12 2005/06/08 19:08:23 drahn Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom. All rights reserved.
@@ -55,7 +55,6 @@ typedef struct ppc_bus_space *bus_space_tag_t;
struct ppc_bus_space {
u_int32_t bus_base;
u_int32_t bus_size;
- u_int8_t bus_reverse; /* Reverse bytes */
u_int8_t bus_io; /* IO or memory */
};
#define POWERPC_BUS_TAG_BASE(x) ((x)->bus_base)
@@ -83,10 +82,7 @@ static __inline CAT3(u_int,m,_t) \
CAT(bus_space_read_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
bus_addr_t ba) \
{ \
- if(bst->bus_reverse) \
return CAT3(in,m,rb)((volatile CAT3(u_int,m,_t) *)(bsh + (ba))); \
- else \
- return CAT(in,m)((volatile CAT3(u_int,m,_t) *)(bsh + (ba))); \
}
bus_space_read(1,8)
@@ -100,10 +96,7 @@ static __inline void \
CAT(bus_space_write_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
bus_addr_t ba, CAT3(u_int,m,_t) x) \
{ \
- if(bst->bus_reverse) \
CAT3(out,m,rb)((volatile CAT3(u_int,m,_t) *)(bsh + (ba)), x); \
- else \
- CAT(out,m)((volatile CAT3(u_int,m,_t) *)(bsh + (ba)), x); \
}
bus_space_write(1,8)
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index f8e124926bb..35b3cc53e67 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.68 2004/06/28 02:49:10 aaron Exp $ */
+/* $OpenBSD: machdep.c,v 1.69 2005/06/08 19:08:23 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -1274,8 +1274,7 @@ bus_space_set_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
int i;
dst = (u_int16_t *) (h+o);
- if (t->bus_reverse)
- val = swap16(val);
+ val = swap16(val);
for (i = 0; i < c; i++)
dst[i] = val;
@@ -1288,8 +1287,7 @@ bus_space_set_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
int i;
dst = (u_int32_t *) (h+o);
- if (t->bus_reverse)
- val = swap32(val);
+ val = swap32(val);
for (i = 0; i < c; i++)
dst[i] = val;
diff --git a/sys/arch/macppc/macppc/ofw_machdep.c b/sys/arch/macppc/macppc/ofw_machdep.c
index 2741b8a1602..fb53df2eac7 100644
--- a/sys/arch/macppc/macppc/ofw_machdep.c
+++ b/sys/arch/macppc/macppc/ofw_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofw_machdep.c,v 1.25 2004/06/24 22:35:56 drahn Exp $ */
+/* $OpenBSD: ofw_machdep.c,v 1.26 2005/06/08 19:08:23 drahn Exp $ */
/* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
@@ -569,7 +569,6 @@ of_display_console()
int i;
cons_membus->bus_base = 0x80000000;
- cons_membus->bus_reverse = 1;
#if 0
err = bus_space_map( cons_membus, cons_addr, addr[0].size_lo,
0, &cons_display_mem_h);
diff --git a/sys/arch/macppc/pci/kauaiata.c b/sys/arch/macppc/pci/kauaiata.c
index e532ee5c001..fecb745ec01 100644
--- a/sys/arch/macppc/pci/kauaiata.c
+++ b/sys/arch/macppc/pci/kauaiata.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kauaiata.c,v 1.3 2003/06/05 22:40:48 drahn Exp $ */
+/* $OpenBSD: kauaiata.c,v 1.4 2005/06/08 19:08:23 drahn Exp $ */
/*
* Copyright (c) 2003 Dale Rahn
@@ -141,8 +141,6 @@ vendor 0x106b product 0x003b (class undefined unknown subclass 0x00, rev 0x00) a
ca.ca_baseaddr = sc->sc_membus_space.bus_base;
- sc->sc_membus_space.bus_reverse = 1;
-
ca.ca_name = name;
ca.ca_iot = &sc->sc_membus_space;
ca.ca_dmat = pa->pa_dmat;
diff --git a/sys/arch/macppc/pci/macobio.c b/sys/arch/macppc/pci/macobio.c
index 99ccca2d9a1..27b8ea7c760 100644
--- a/sys/arch/macppc/pci/macobio.c
+++ b/sys/arch/macppc/pci/macobio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macobio.c,v 1.9 2003/10/15 23:00:56 drahn Exp $ */
+/* $OpenBSD: macobio.c,v 1.10 2005/06/08 19:08:23 drahn Exp $ */
/* $NetBSD: obio.c,v 1.6 1999/05/01 10:36:08 tsubai Exp $ */
/*-
@@ -162,8 +162,6 @@ macobio_attach(struct device *parent, struct device *self, void *aux)
sc->sc_membus_space.bus_base = ca.ca_baseaddr;
- sc->sc_membus_space.bus_reverse = 1;
-
ca.ca_iot = &sc->sc_membus_space;
ca.ca_dmat = pa->pa_dmat;
diff --git a/sys/arch/macppc/pci/mpcpcibus.c b/sys/arch/macppc/pci/mpcpcibus.c
index 9e0713d53af..44ddae6ddb8 100644
--- a/sys/arch/macppc/pci/mpcpcibus.c
+++ b/sys/arch/macppc/pci/mpcpcibus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpcpcibus.c,v 1.23 2003/12/20 22:40:27 miod Exp $ */
+/* $OpenBSD: mpcpcibus.c,v 1.24 2005/06/08 19:08:23 drahn Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
@@ -223,9 +223,7 @@ mpcpcibrattach(struct device *parent, struct device *self, void *aux)
}
if (map == 1) {
sc->sc_membus_space.bus_base = MPC106_P_PCI_MEM_SPACE;
- sc->sc_membus_space.bus_reverse = 1;
sc->sc_iobus_space.bus_base = MPC106_P_PCI_IO_SPACE;
- sc->sc_iobus_space.bus_reverse = 1;
if ( bus_space_map(&(sc->sc_iobus_space), 0, NBPG, 0,
&lcp->ioh_cf8) != 0 )
panic("mpcpcibus: unable to map self");
@@ -234,10 +232,8 @@ mpcpcibrattach(struct device *parent, struct device *self, void *aux)
} else {
sc->sc_membus_space.bus_base =
MPC106_P_PCI_MEM_SPACE_MAP_B;
- sc->sc_membus_space.bus_reverse = 1;
sc->sc_iobus_space.bus_base =
MPC106_P_PCI_IO_SPACE_MAP_B;
- sc->sc_iobus_space.bus_reverse = 1;
if ( bus_space_map(&(sc->sc_iobus_space), 0xfec00000,
NBPG, 0, &lcp->ioh_cf8) != 0 )
panic("mpcpcibus: unable to map self");
@@ -349,10 +345,8 @@ mpcpcibrattach(struct device *parent, struct device *self, void *aux)
/* mac configs */
sc->sc_membus_space.bus_base = 0;
- sc->sc_membus_space.bus_reverse = 1;
sc->sc_membus_space.bus_io = 0;
sc->sc_iobus_space.bus_base = 0;
- sc->sc_iobus_space.bus_reverse = 1;
sc->sc_iobus_space.bus_io = 1;
/* find io(config) base, flag == 0x01000000 */