summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-03-07 18:08:09 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-03-07 18:08:09 +0000
commit2afe5d52c97872711a9e4d37486cda176ec8cd45 (patch)
tree37b952aa0b88672624bf358ec5bed4014c4cf289
parentd4daec323e15eacdfee711f69ae5c11d6fa99b79 (diff)
Clean up BUS_DMA_* flags, and make sure all arch's define:
BUS_DMA_READ, BUS_DMA_WRITE, and BUS_DMA_STREAMING
-rw-r--r--sys/arch/alpha/include/bus.h21
-rw-r--r--sys/arch/hppa/include/bus.h19
-rw-r--r--sys/arch/i386/include/bus.h21
-rw-r--r--sys/arch/macppc/include/bus.h24
-rw-r--r--sys/arch/sparc64/include/bus.h5
-rw-r--r--sys/arch/vax/include/bus.h21
6 files changed, 64 insertions, 47 deletions
diff --git a/sys/arch/alpha/include/bus.h b/sys/arch/alpha/include/bus.h
index 0f7d4a1c183..3fd5bdc6724 100644
--- a/sys/arch/alpha/include/bus.h
+++ b/sys/arch/alpha/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.15 2001/11/05 17:25:57 art Exp $ */
+/* $OpenBSD: bus.h,v 1.16 2002/03/07 18:08:08 jason Exp $ */
/* $NetBSD: bus.h,v 1.10 1996/12/02 22:19:32 cgd Exp $ */
/*
@@ -408,14 +408,17 @@ struct alpha_bus_space {
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint: map memory DMA coherent */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#define BUS_DMA_WAITOK 0x000 /* safe to sleep (pseudo-flag) */
+#define BUS_DMA_NOWAIT 0x001 /* not safe to sleep */
+#define BUS_DMA_ALLOCNOW 0x002 /* perform resource allocation now */
+#define BUS_DMA_COHERENT 0x004 /* hint: map memory DMA coherent */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_STREAMING 0x100 /* hint: sequential, unidirectional */
+#define BUS_DMA_READ 0x200 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x400 /* mapping is memory -> device only */
/*
* Private flags stored in the DMA map.
diff --git a/sys/arch/hppa/include/bus.h b/sys/arch/hppa/include/bus.h
index 0e069b60dc9..ab30eddd3d0 100644
--- a/sys/arch/hppa/include/bus.h
+++ b/sys/arch/hppa/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.17 2002/02/16 03:13:32 mickey Exp $ */
+/* $OpenBSD: bus.h,v 1.18 2002/03/07 18:08:08 jason Exp $ */
/*
* Copyright (c) 1998,1999 Michael Shalayeff
@@ -286,11 +286,18 @@ extern const struct hppa_bus_space_tag hppa_bustag;
#define bus_space_barrier(t,h,o,l,op) \
((t)->hbt_barrier((t)->hbt_cookie, (h), (o), (l), (op)))
-#define BUS_DMA_WAITOK 0x00
-#define BUS_DMA_NOWAIT 0x01
-#define BUS_DMA_ALLOCNOW 0x02
-#define BUS_DMA_COHERENT 0x04
-#define BUS_DMAMEM_NOSYNC 0x10
+#define BUS_DMA_WAITOK 0x000 /* safe to sleep (pseudo-flag) */
+#define BUS_DMA_NOWAIT 0x001 /* not safe to sleep */
+#define BUS_DMA_ALLOCNOW 0x002 /* perform resource allocation now */
+#define BUS_DMA_COHERENT 0x004 /* hint: map memory DMA coherent */
+#define BUS_DMAMEM_NOSYNC 0x010
+#define BUS_DMA_BUS1 0x020 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x040
+#define BUS_DMA_BUS3 0x080
+#define BUS_DMA_BUS4 0x100
+#define BUS_DMA_STREAMING 0x200 /* hint: sequential, unidirectional */
+#define BUS_DMA_READ 0x400 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x800 /* mapping is memory -> device only */
/* Forwards needed by prototypes below. */
struct mbuf;
diff --git a/sys/arch/i386/include/bus.h b/sys/arch/i386/include/bus.h
index 7f65068456f..3ac591f0149 100644
--- a/sys/arch/i386/include/bus.h
+++ b/sys/arch/i386/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.31 2001/11/05 17:25:57 art Exp $ */
+/* $OpenBSD: bus.h,v 1.32 2002/03/07 18:08:08 jason Exp $ */
/* $NetBSD: bus.h,v 1.6 1996/11/10 03:19:25 thorpej Exp $ */
/*-
@@ -732,14 +732,17 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh,
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint: map memory DMA coherent */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#define BUS_DMA_WAITOK 0x000 /* safe to sleep (pseudo-flag) */
+#define BUS_DMA_NOWAIT 0x001 /* not safe to sleep */
+#define BUS_DMA_ALLOCNOW 0x002 /* perform resource allocation now */
+#define BUS_DMA_COHERENT 0x004 /* hint: map memory DMA coherent */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_STREAMING 0x100 /* hint: sequential, unidirectional */
+#define BUS_DMA_READ 0x200 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x400 /* mapping is memory -> device only */
/* Forwards needed by prototypes below. */
struct mbuf;
diff --git a/sys/arch/macppc/include/bus.h b/sys/arch/macppc/include/bus.h
index 5ed52d0765b..c377b90e679 100644
--- a/sys/arch/macppc/include/bus.h
+++ b/sys/arch/macppc/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.3 2001/12/14 03:02:50 drahn Exp $ */
+/* $OpenBSD: bus.h,v 1.4 2002/03/07 18:08:08 jason Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom. All rights reserved.
@@ -378,16 +378,18 @@ bus_space_copy_4 __P((void *v, bus_space_handle_t h1, bus_space_handle_t h2,
#define BUS_BARRIER_WRITE BUS_SPACE_BARRIER_WRITE
-#define BUS_DMA_WAITOK 0x00
-#define BUS_DMA_NOWAIT 0x01
-#define BUS_DMA_ALLOCNOW 0x02
-#define BUS_DMAMEM_NOSYNC 0x04
-#define BUS_DMA_COHERENT 0x08
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
-#define BUS_DMA_READ 0x100
+#define BUS_DMA_WAITOK 0x000 /* safe to sleep (pseudo-flag) */
+#define BUS_DMA_NOWAIT 0x001 /* not safe to sleep */
+#define BUS_DMA_ALLOCNOW 0x002 /* perform resource allocation now */
+#define BUS_DMAMEM_NOSYNC 0x004
+#define BUS_DMA_COHERENT 0x008 /* hint: map memory DMA coherent */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
+#define BUS_DMA_STREAMING 0x400 /* hint: sequential, unidirectional */
/* Forwards needed by prototypes below. */
diff --git a/sys/arch/sparc64/include/bus.h b/sys/arch/sparc64/include/bus.h
index f33550d500f..52ff2080760 100644
--- a/sys/arch/sparc64/include/bus.h
+++ b/sys/arch/sparc64/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.9 2002/02/19 05:03:42 jason Exp $ */
+/* $OpenBSD: bus.h,v 1.10 2002/03/07 18:08:08 jason Exp $ */
/* $NetBSD: bus.h,v 1.31 2001/09/21 15:30:41 wiz Exp $ */
/*-
@@ -1420,7 +1420,7 @@ bus_space_copy_region_stream_8(t, h1, o1, h2, o2, c)
#define BUS_DMA_ALLOCNOW 0x002 /* perform resource allocation now */
#define BUS_DMA_COHERENT 0x004 /* hint: map memory DMA coherent */
#define BUS_DMA_NOWRITE 0x008 /* I suppose the following two should default on */
-#define BUS_DMA_BUS1 0x010
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
#define BUS_DMA_BUS2 0x020
#define BUS_DMA_BUS3 0x040
#define BUS_DMA_BUS4 0x080
@@ -1428,7 +1428,6 @@ bus_space_copy_region_stream_8(t, h1, o1, h2, o2, c)
#define BUS_DMA_READ 0x200 /* mapping is device -> memory only */
#define BUS_DMA_WRITE 0x400 /* mapping is memory -> device only */
-
#define BUS_DMA_NOCACHE BUS_DMA_BUS1
#define BUS_DMA_DVMA BUS_DMA_BUS2 /* Don't bother with alignment */
diff --git a/sys/arch/vax/include/bus.h b/sys/arch/vax/include/bus.h
index 9d2aefbde17..71285efbb7e 100644
--- a/sys/arch/vax/include/bus.h
+++ b/sys/arch/vax/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.3 2001/07/30 14:16:00 art Exp $ */
+/* $OpenBSD: bus.h,v 1.4 2002/03/07 18:08:08 jason Exp $ */
/* $NetBSD: bus.h,v 1.14 2000/06/26 04:56:13 simonb Exp $ */
/*-
@@ -859,14 +859,17 @@ vax_mem_copy_region_4(t, h1, o1, h2, o2, c)
/*
* Flags used in various bus DMA methods.
*/
-#define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */
-#define BUS_DMA_NOWAIT 0x01 /* not safe to sleep */
-#define BUS_DMA_ALLOCNOW 0x02 /* perform resource allocation now */
-#define BUS_DMA_COHERENT 0x04 /* hint: map memory DMA coherent */
-#define BUS_DMA_BUS1 0x10 /* placeholders for bus functions... */
-#define BUS_DMA_BUS2 0x20
-#define BUS_DMA_BUS3 0x40
-#define BUS_DMA_BUS4 0x80
+#define BUS_DMA_WAITOK 0x000 /* safe to sleep (pseudo-flag) */
+#define BUS_DMA_NOWAIT 0x001 /* not safe to sleep */
+#define BUS_DMA_ALLOCNOW 0x002 /* perform resource allocation now */
+#define BUS_DMA_COHERENT 0x004 /* hint: map memory DMA coherent */
+#define BUS_DMA_BUS1 0x010 /* placeholders for bus functions... */
+#define BUS_DMA_BUS2 0x020
+#define BUS_DMA_BUS3 0x040
+#define BUS_DMA_BUS4 0x080
+#define BUS_DMA_STREAMING 0x100 /* hint: sequential, unidirectional */
+#define BUS_DMA_READ 0x200 /* mapping is device -> memory only */
+#define BUS_DMA_WRITE 0x400 /* mapping is memory -> device only */
#define VAX_BUS_DMA_SPILLPAGE BUS_DMA_BUS1 /* VS4000 kludge */
/*