summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-04-26 21:09:51 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-04-26 21:09:51 +0000
commita7b949638fafdb303fa4913e60a41e483b12d5e1 (patch)
tree9132eeb0091632b94e4599eadc671876d8b6ad90 /sys/arch/mvme88k
parentbf998542c38e5272e4f15b1d26c81803d5c62017 (diff)
Define BUS_SPACE_MAP_LINEAR and use it when appropriate. Right now
bus_space_map() always maps everything linear, but this could change in the future.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/dev/if_le.c5
-rw-r--r--sys/arch/mvme88k/dev/sram.c5
-rw-r--r--sys/arch/mvme88k/include/bus.h9
3 files changed, 12 insertions, 7 deletions
diff --git a/sys/arch/mvme88k/dev/if_le.c b/sys/arch/mvme88k/dev/if_le.c
index 0c99c44bd51..e23e69cbd3d 100644
--- a/sys/arch/mvme88k/dev/if_le.c
+++ b/sys/arch/mvme88k/dev/if_le.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le.c,v 1.13 2006/04/26 21:06:08 miod Exp $ */
+/* $OpenBSD: if_le.c,v 1.14 2006/04/26 21:09:48 miod Exp $ */
/*-
* Copyright (c) 1982, 1992, 1993
@@ -288,7 +288,8 @@ leattach(parent, self, aux)
}
paddr = VLEMEMBASE - (card * VLEMEMSIZE);
- if (bus_space_map(iot, paddr, VLEMEMSIZE, 0, &memh) != 0) {
+ if (bus_space_map(iot, paddr, VLEMEMSIZE, BUS_SPACE_MAP_LINEAR,
+ &memh) != 0) {
printf(": can't map buffers!\n");
bus_space_unmap(iot, ioh, PAGE_SIZE);
return;
diff --git a/sys/arch/mvme88k/dev/sram.c b/sys/arch/mvme88k/dev/sram.c
index abb15eb3170..bc6ea49e4f1 100644
--- a/sys/arch/mvme88k/dev/sram.c
+++ b/sys/arch/mvme88k/dev/sram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sram.c,v 1.17 2004/04/24 19:51:48 miod Exp $ */
+/* $OpenBSD: sram.c,v 1.18 2006/04/26 21:09:48 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -85,7 +85,8 @@ sramattach(parent, self, args)
sc->sc_base = ca->ca_paddr;
sc->sc_len = 128 * 1024; /* always 128K */
- if (bus_space_map(sc->sc_iot, sc->sc_base, sc->sc_len, 0, &ioh) != 0) {
+ if (bus_space_map(sc->sc_iot, sc->sc_base, sc->sc_len,
+ BUS_SPACE_MAP_LINEAR, &ioh) != 0) {
printf(": can't map memory!\n");
return;
}
diff --git a/sys/arch/mvme88k/include/bus.h b/sys/arch/mvme88k/include/bus.h
index d1d3cffc2d4..ffaa1361523 100644
--- a/sys/arch/mvme88k/include/bus.h
+++ b/sys/arch/mvme88k/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.4 2006/01/01 00:41:02 millert Exp $ */
+/* $OpenBSD: bus.h,v 1.5 2006/04/26 21:09:50 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
*
@@ -57,6 +57,9 @@ typedef const struct mvme88k_bus_space_tag *bus_space_tag_t;
#define BUS_SPACE_BARRIER_READ 0
#define BUS_SPACE_BARRIER_WRITE 1
+#define BUS_SPACE_MAP_CACHEABLE 0x01
+#define BUS_SPACE_MAP_LINEAR 0x02
+
/*
* General bus_space function set
*/
@@ -709,6 +712,8 @@ bus_space_copy_4(bus_space_tag_t tag, bus_space_handle_t h1, bus_addr_t o1,
}
}
+#endif /* __BUS_SPACE_RESTRICT_D16__ */
+
/*
* Extra D16 access functions (see vme.c)
*/
@@ -716,8 +721,6 @@ bus_space_copy_4(bus_space_tag_t tag, bus_space_handle_t h1, bus_addr_t o1,
void d16_bcopy(const void *, void *, size_t);
void d16_bzero(void *, size_t);
-#endif /* __BUS_SPACE_RESTRICT_D16__ */
-
/*
* Bus DMA implementation
*/