Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Move the ISA DMA cookie into isadma_machdep.c.
details: https://anonhg.NetBSD.org/src/rev/f8300c4deb14
branches: trunk
changeset: 499280:f8300c4deb14
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Nov 15 19:31:35 2000 +0000
description:
Move the ISA DMA cookie into isadma_machdep.c.
diffstat:
sys/arch/bebox/include/isa_machdep.h | 57 +-----------------------------------
sys/arch/bebox/isa/isadma_machdep.c | 38 +++++++++++++++++++++++-
sys/arch/prep/include/isa_machdep.h | 57 +-----------------------------------
sys/arch/prep/isa/isadma_machdep.c | 38 +++++++++++++++++++++++-
4 files changed, 76 insertions(+), 114 deletions(-)
diffs (260 lines):
diff -r ba982599b79a -r f8300c4deb14 sys/arch/bebox/include/isa_machdep.h
--- a/sys/arch/bebox/include/isa_machdep.h Wed Nov 15 19:30:10 2000 +0000
+++ b/sys/arch/bebox/include/isa_machdep.h Wed Nov 15 19:31:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.h,v 1.11 2000/06/04 19:14:36 cgd Exp $ */
+/* $NetBSD: isa_machdep.h,v 1.12 2000/11/15 19:31:35 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -170,42 +170,6 @@
extern struct bebox_bus_dma_tag isa_bus_dma_tag;
/*
- * Cookie used by ISA dma. A pointer to one of these it stashed in
- * the DMA map.
- */
-struct bebox_isa_dma_cookie {
- int id_flags; /* flags; see below */
-
- /*
- * Information about the original buffer used during
- * DMA map syncs. Note that origbuflen is only used
- * for ID_BUFTYPE_LINEAR.
- */
- void *id_origbuf; /* pointer to orig buffer if
- bouncing */
- bus_size_t id_origbuflen; /* ...and size */
- int id_buftype; /* type of buffer */
-
- void *id_bouncebuf; /* pointer to the bounce buffer */
- bus_size_t id_bouncebuflen; /* ...and size */
- int id_nbouncesegs; /* number of valid bounce segs */
- bus_dma_segment_t id_bouncesegs[0]; /* array of bounce buffer
- physical memory segments */
-};
-
-/* id_flags */
-#define ID_MIGHT_NEED_BOUNCE 0x01 /* map could need bounce buffers */
-#define ID_HAS_BOUNCE 0x02 /* map currently has bounce buffers */
-#define ID_IS_BOUNCING 0x04 /* map is bouncing current xfer */
-
-/* id_buftype */
-#define ID_BUFTYPE_INVALID 0
-#define ID_BUFTYPE_LINEAR 1
-#define ID_BUFTYPE_MBUF 2
-#define ID_BUFTYPE_UIO 3
-#define ID_BUFTYPE_RAW 4
-
-/*
* XXX Various seemingly PC-specific constants, some of which may be
* unnecessary anyway.
*/
@@ -217,25 +181,6 @@
#define MONO_BUF 0xB0000
#define CGA_BASE 0x3D4
#define CGA_BUF 0xB8000
-#define IOPHYSMEM 0xA0000
-
-
-/*
- * ISA DMA bounce buffers.
- * XXX should be made partially machine- and bus-mapping-independent.
- *
- * DMA_BOUNCE is the number of pages of low-addressed physical memory
- * to acquire for ISA bounce buffers.
- *
- * isaphysmem is the location of those bounce buffers. (They are currently
- * assumed to be contiguous.
- */
-
-#ifndef DMA_BOUNCE
-#define DMA_BOUNCE 8 /* one buffer per channel */
-#endif
-
-extern paddr_t isaphysmem;
/*
* Miscellanous functions.
diff -r ba982599b79a -r f8300c4deb14 sys/arch/bebox/isa/isadma_machdep.c
--- a/sys/arch/bebox/isa/isadma_machdep.c Wed Nov 15 19:30:10 2000 +0000
+++ b/sys/arch/bebox/isa/isadma_machdep.c Wed Nov 15 19:31:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isadma_machdep.c,v 1.16 2000/06/29 08:22:17 mrg Exp $ */
+/* $NetBSD: isadma_machdep.c,v 1.17 2000/11/15 19:31:36 thorpej Exp $ */
#define ISA_DMA_STATS
@@ -65,6 +65,42 @@
*/
#define ISA_DMA_BOUNCE_THRESHOLD (16 * 1024 * 1024)
+/*
+ * Cookie used by ISA DMA. A pointer to one of these is stashed in
+ * the DMA map.
+ */
+struct bebox_isa_dma_cookie {
+ int id_flags; /* flags; see below */
+
+ /*
+ * Information about the original buffer used during
+ * DMA map syncs. Note that origbuflen is only used
+ * for ID_BUFTYPE_LINEAR.
+ */
+ void *id_origbuf; /* pointer to orig buffer if
+ bouncing */
+ bus_size_t id_origbuflen; /* ...and size */
+ int id_buftype; /* type of buffer */
+
+ void *id_bouncebuf; /* pointer to the bounce buffer */
+ bus_size_t id_bouncebuflen; /* ...and size */
+ int id_nbouncesegs; /* number of valid bounce segs */
+ bus_dma_segment_t id_bouncesegs[0]; /* array of bounce buffer
+ physical memory segments */
+};
+
+/* id_flags */
+#define ID_MIGHT_NEED_BOUNCE 0x01 /* map could need bounce buffers */
+#define ID_HAS_BOUNCE 0x02 /* map currently has bounce buffers */
+#define ID_IS_BOUNCING 0x04 /* map is bouncing current xfer */
+
+/* id_buftype */
+#define ID_BUFTYPE_INVALID 0
+#define ID_BUFTYPE_LINEAR 1
+#define ID_BUFTYPE_MBUF 2
+#define ID_BUFTYPE_UIO 3
+#define ID_BUFTYPE_RAW 4
+
int _isa_bus_dmamap_create __P((bus_dma_tag_t, bus_size_t, int,
bus_size_t, bus_size_t, int, bus_dmamap_t *));
void _isa_bus_dmamap_destroy __P((bus_dma_tag_t, bus_dmamap_t));
diff -r ba982599b79a -r f8300c4deb14 sys/arch/prep/include/isa_machdep.h
--- a/sys/arch/prep/include/isa_machdep.h Wed Nov 15 19:30:10 2000 +0000
+++ b/sys/arch/prep/include/isa_machdep.h Wed Nov 15 19:31:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.h,v 1.3 2000/06/04 19:14:58 cgd Exp $ */
+/* $NetBSD: isa_machdep.h,v 1.4 2000/11/15 19:31:57 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -170,42 +170,6 @@
extern struct prep_bus_dma_tag isa_bus_dma_tag;
/*
- * Cookie used by ISA dma. A pointer to one of these it stashed in
- * the DMA map.
- */
-struct prep_isa_dma_cookie {
- int id_flags; /* flags; see below */
-
- /*
- * Information about the original buffer used during
- * DMA map syncs. Note that origbuflen is only used
- * for ID_BUFTYPE_LINEAR.
- */
- void *id_origbuf; /* pointer to orig buffer if
- bouncing */
- bus_size_t id_origbuflen; /* ...and size */
- int id_buftype; /* type of buffer */
-
- void *id_bouncebuf; /* pointer to the bounce buffer */
- bus_size_t id_bouncebuflen; /* ...and size */
- int id_nbouncesegs; /* number of valid bounce segs */
- bus_dma_segment_t id_bouncesegs[0]; /* array of bounce buffer
- physical memory segments */
-};
-
-/* id_flags */
-#define ID_MIGHT_NEED_BOUNCE 0x01 /* map could need bounce buffers */
-#define ID_HAS_BOUNCE 0x02 /* map currently has bounce buffers */
-#define ID_IS_BOUNCING 0x04 /* map is bouncing current xfer */
-
-/* id_buftype */
-#define ID_BUFTYPE_INVALID 0
-#define ID_BUFTYPE_LINEAR 1
-#define ID_BUFTYPE_MBUF 2
-#define ID_BUFTYPE_UIO 3
-#define ID_BUFTYPE_RAW 4
-
-/*
* XXX Various seemingly PC-specific constants, some of which may be
* unnecessary anyway.
*/
@@ -217,25 +181,6 @@
#define MONO_BUF 0xB0000
#define CGA_BASE 0x3D4
#define CGA_BUF 0xB8000
-#define IOPHYSMEM 0xA0000
-
-
-/*
- * ISA DMA bounce buffers.
- * XXX should be made partially machine- and bus-mapping-independent.
- *
- * DMA_BOUNCE is the number of pages of low-addressed physical memory
- * to acquire for ISA bounce buffers.
- *
- * isaphysmem is the location of those bounce buffers. (They are currently
- * assumed to be contiguous.
- */
-
-#ifndef DMA_BOUNCE
-#define DMA_BOUNCE 8 /* one buffer per channel */
-#endif
-
-extern paddr_t isaphysmem;
/*
* Miscellanous functions.
diff -r ba982599b79a -r f8300c4deb14 sys/arch/prep/isa/isadma_machdep.c
--- a/sys/arch/prep/isa/isadma_machdep.c Wed Nov 15 19:30:10 2000 +0000
+++ b/sys/arch/prep/isa/isadma_machdep.c Wed Nov 15 19:31:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isadma_machdep.c,v 1.2 2000/06/29 07:47:52 mrg Exp $ */
+/* $NetBSD: isadma_machdep.c,v 1.3 2000/11/15 19:31:57 thorpej Exp $ */
#define ISA_DMA_STATS
@@ -64,6 +64,42 @@
*/
#define ISA_DMA_BOUNCE_THRESHOLD (16 * 1024 * 1024)
+/*
+ * Cookie used by ISA dma. A pointer to one of these it stashed in
+ * the DMA map.
+ */
+struct prep_isa_dma_cookie {
+ int id_flags; /* flags; see below */
+
+ /*
+ * Information about the original buffer used during
+ * DMA map syncs. Note that origbuflen is only used
+ * for ID_BUFTYPE_LINEAR.
+ */
+ void *id_origbuf; /* pointer to orig buffer if
+ bouncing */
+ bus_size_t id_origbuflen; /* ...and size */
+ int id_buftype; /* type of buffer */
+
+ void *id_bouncebuf; /* pointer to the bounce buffer */
+ bus_size_t id_bouncebuflen; /* ...and size */
+ int id_nbouncesegs; /* number of valid bounce segs */
+ bus_dma_segment_t id_bouncesegs[0]; /* array of bounce buffer
+ physical memory segments */
+};
+
+/* id_flags */
+#define ID_MIGHT_NEED_BOUNCE 0x01 /* map could need bounce buffers */
+#define ID_HAS_BOUNCE 0x02 /* map currently has bounce buffers */
+#define ID_IS_BOUNCING 0x04 /* map is bouncing current xfer */
+
+/* id_buftype */
+#define ID_BUFTYPE_INVALID 0
+#define ID_BUFTYPE_LINEAR 1
+#define ID_BUFTYPE_MBUF 2
+#define ID_BUFTYPE_UIO 3
+#define ID_BUFTYPE_RAW 4
+
int _isa_bus_dmamap_create __P((bus_dma_tag_t, bus_size_t, int,
bus_size_t, bus_size_t, int, bus_dmamap_t *));
void _isa_bus_dmamap_destroy __P((bus_dma_tag_t, bus_dmamap_t));
Home |
Main Index |
Thread Index |
Old Index