Simplify the direct-mapped DMA case somewhat by adding a window base
member to the DMA tag, and calling the direct-mapped back-ends directly, rather than through chipset-specific front-ends which pass the window base as an additional argument.
This commit is contained in:
parent
23a9b2c5c9
commit
4665241bf8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bus_dma.c,v 1.17 1998/03/17 04:59:36 thorpej Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.18 1998/05/07 20:09:37 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.17 1998/03/17 04:59:36 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.18 1998/05/07 20:09:37 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -221,14 +221,13 @@ _bus_dmamap_load_buffer_direct_common(map, buf, buflen, p, flags, wbase,
|
|||
* chipset.
|
||||
*/
|
||||
int
|
||||
_bus_dmamap_load_direct_common(t, map, buf, buflen, p, flags, wbase)
|
||||
_bus_dmamap_load_direct(t, map, buf, buflen, p, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
void *buf;
|
||||
bus_size_t buflen;
|
||||
struct proc *p;
|
||||
int flags;
|
||||
bus_addr_t wbase;
|
||||
{
|
||||
vm_offset_t lastaddr;
|
||||
int seg, error;
|
||||
|
@ -244,7 +243,7 @@ _bus_dmamap_load_direct_common(t, map, buf, buflen, p, flags, wbase)
|
|||
|
||||
seg = 0;
|
||||
error = _bus_dmamap_load_buffer_direct_common(map, buf, buflen,
|
||||
p, flags, wbase, &lastaddr, &seg, 1);
|
||||
p, flags, t->_wbase, &lastaddr, &seg, 1);
|
||||
if (error == 0) {
|
||||
map->dm_mapsize = buflen;
|
||||
map->dm_nsegs = seg + 1;
|
||||
|
@ -256,12 +255,11 @@ _bus_dmamap_load_direct_common(t, map, buf, buflen, p, flags, wbase)
|
|||
* Like _bus_dmamap_load_direct_common(), but for mbufs.
|
||||
*/
|
||||
int
|
||||
_bus_dmamap_load_mbuf_direct_common(t, map, m0, flags, wbase)
|
||||
_bus_dmamap_load_mbuf_direct(t, map, m0, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct mbuf *m0;
|
||||
int flags;
|
||||
bus_addr_t wbase;
|
||||
{
|
||||
vm_offset_t lastaddr;
|
||||
int seg, error, first;
|
||||
|
@ -286,7 +284,7 @@ _bus_dmamap_load_mbuf_direct_common(t, map, m0, flags, wbase)
|
|||
error = 0;
|
||||
for (m = m0; m != NULL && error == 0; m = m->m_next) {
|
||||
error = _bus_dmamap_load_buffer_direct_common(map,
|
||||
m->m_data, m->m_len, NULL, flags, wbase, &lastaddr,
|
||||
m->m_data, m->m_len, NULL, flags, t->_wbase, &lastaddr,
|
||||
&seg, first);
|
||||
first = 0;
|
||||
}
|
||||
|
@ -301,32 +299,30 @@ _bus_dmamap_load_mbuf_direct_common(t, map, m0, flags, wbase)
|
|||
* Like _bus_dmamap_load_direct_common(), but for uios.
|
||||
*/
|
||||
int
|
||||
_bus_dmamap_load_uio_direct_common(t, map, uio, flags, wbase)
|
||||
_bus_dmamap_load_uio_direct(t, map, uio, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
bus_addr_t wbase;
|
||||
{
|
||||
|
||||
panic("_bus_dmamap_load_uio_direct_common: not implemented");
|
||||
panic("_bus_dmamap_load_uio_direct: not implemented");
|
||||
}
|
||||
|
||||
/*
|
||||
* Like _bus_dmamap_load_direct_common(), but for raw memory.
|
||||
*/
|
||||
int
|
||||
_bus_dmamap_load_raw_direct_common(t, map, segs, nsegs, size, flags, wbase)
|
||||
_bus_dmamap_load_raw_direct(t, map, segs, nsegs, size, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
bus_size_t size;
|
||||
int flags;
|
||||
bus_addr_t wbase;
|
||||
{
|
||||
|
||||
panic("_bus_dmamap_load_raw_direct_common: not implemented");
|
||||
panic("_bus_dmamap_load_raw_direct: not implemented");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bus.h,v 1.20 1998/02/04 07:36:10 thorpej Exp $ */
|
||||
/* $NetBSD: bus.h,v 1.21 1998/05/07 20:09:37 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -457,6 +457,7 @@ typedef struct alpha_bus_dma_segment bus_dma_segment_t;
|
|||
*/
|
||||
struct alpha_bus_dma_tag {
|
||||
void *_cookie; /* cookie used in the guts */
|
||||
bus_addr_t _wbase; /* DMA window base */
|
||||
|
||||
/*
|
||||
* Internal-use only utility methods. NOT TO BE USED BY
|
||||
|
@ -563,15 +564,14 @@ int _bus_dmamap_create __P((bus_dma_tag_t, bus_size_t, int, bus_size_t,
|
|||
bus_size_t, int, bus_dmamap_t *));
|
||||
void _bus_dmamap_destroy __P((bus_dma_tag_t, bus_dmamap_t));
|
||||
|
||||
int _bus_dmamap_load_direct_common __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
void *, bus_size_t, struct proc *, int, bus_addr_t));
|
||||
int _bus_dmamap_load_mbuf_direct_common __P((bus_dma_tag_t,
|
||||
bus_dmamap_t, struct mbuf *, int, bus_addr_t));
|
||||
int _bus_dmamap_load_uio_direct_common __P((bus_dma_tag_t,
|
||||
bus_dmamap_t, struct uio *, int, bus_addr_t));
|
||||
int _bus_dmamap_load_raw_direct_common __P((bus_dma_tag_t,
|
||||
bus_dmamap_t, bus_dma_segment_t *, int, bus_size_t,
|
||||
int, bus_addr_t));
|
||||
int _bus_dmamap_load_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
void *, bus_size_t, struct proc *, int));
|
||||
int _bus_dmamap_load_mbuf_direct __P((bus_dma_tag_t,
|
||||
bus_dmamap_t, struct mbuf *, int));
|
||||
int _bus_dmamap_load_uio_direct __P((bus_dma_tag_t,
|
||||
bus_dmamap_t, struct uio *, int));
|
||||
int _bus_dmamap_load_raw_direct __P((bus_dma_tag_t,
|
||||
bus_dmamap_t, bus_dma_segment_t *, int, bus_size_t, int));
|
||||
|
||||
void _bus_dmamap_unload __P((bus_dma_tag_t, bus_dmamap_t));
|
||||
void _bus_dmamap_sync __P((bus_dma_tag_t, bus_dmamap_t, bus_addr_t,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: apecs_dma.c,v 1.7 1998/02/04 07:37:28 thorpej Exp $ */
|
||||
/* $NetBSD: apecs_dma.c,v 1.8 1998/05/07 20:09:37 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: apecs_dma.c,v 1.7 1998/02/04 07:37:28 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: apecs_dma.c,v 1.8 1998/05/07 20:09:37 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -63,23 +63,15 @@ int apecs_bus_dmamap_create_sgmap __P((bus_dma_tag_t, bus_size_t, int,
|
|||
|
||||
void apecs_bus_dmamap_destroy_sgmap __P((bus_dma_tag_t, bus_dmamap_t));
|
||||
|
||||
int apecs_bus_dmamap_load_direct __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
int apecs_bus_dmamap_load_sgmap __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
|
||||
int apecs_bus_dmamap_load_mbuf_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
int apecs_bus_dmamap_load_mbuf_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
|
||||
int apecs_bus_dmamap_load_uio_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
int apecs_bus_dmamap_load_uio_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
|
||||
int apecs_bus_dmamap_load_raw_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
int apecs_bus_dmamap_load_raw_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
|
||||
|
@ -117,13 +109,14 @@ apecs_dma_init(acp)
|
|||
*/
|
||||
t = &acp->ac_dmat_direct;
|
||||
t->_cookie = acp;
|
||||
t->_wbase = APECS_DIRECT_MAPPED_BASE;
|
||||
t->_get_tag = apecs_dma_get_tag;
|
||||
t->_dmamap_create = _bus_dmamap_create;
|
||||
t->_dmamap_destroy = _bus_dmamap_destroy;
|
||||
t->_dmamap_load = apecs_bus_dmamap_load_direct;
|
||||
t->_dmamap_load_mbuf = apecs_bus_dmamap_load_mbuf_direct;
|
||||
t->_dmamap_load_uio = apecs_bus_dmamap_load_uio_direct;
|
||||
t->_dmamap_load_raw = apecs_bus_dmamap_load_raw_direct;
|
||||
t->_dmamap_load = _bus_dmamap_load_direct;
|
||||
t->_dmamap_load_mbuf = _bus_dmamap_load_mbuf_direct;
|
||||
t->_dmamap_load_uio = _bus_dmamap_load_uio_direct;
|
||||
t->_dmamap_load_raw = _bus_dmamap_load_raw_direct;
|
||||
t->_dmamap_unload = _bus_dmamap_unload;
|
||||
t->_dmamap_sync = _bus_dmamap_sync;
|
||||
|
||||
|
@ -138,6 +131,7 @@ apecs_dma_init(acp)
|
|||
*/
|
||||
t = &acp->ac_dmat_sgmap;
|
||||
t->_cookie = acp;
|
||||
t->_wbase = APECS_SGMAP_MAPPED_BASE;
|
||||
t->_get_tag = apecs_dma_get_tag;
|
||||
t->_dmamap_create = apecs_bus_dmamap_create_sgmap;
|
||||
t->_dmamap_destroy = apecs_bus_dmamap_destroy_sgmap;
|
||||
|
@ -283,23 +277,6 @@ apecs_bus_dmamap_destroy_sgmap(t, map)
|
|||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an APECS direct-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
int
|
||||
apecs_bus_dmamap_load_direct(t, map, buf, buflen, p, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
void *buf;
|
||||
bus_size_t buflen;
|
||||
struct proc *p;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_direct_common(t, map, buf, buflen, p,
|
||||
flags, APECS_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an APECS SGMAP-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
|
@ -323,21 +300,6 @@ apecs_bus_dmamap_load_sgmap(t, map, buf, buflen, p, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an APECS direct-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
int
|
||||
apecs_bus_dmamap_load_mbuf_direct(t, map, m, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct mbuf *m;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_mbuf_direct_common(t, map, m,
|
||||
flags, APECS_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an APECS SGMAP-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
|
@ -358,21 +320,6 @@ apecs_bus_dmamap_load_mbuf_sgmap(t, map, m, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an APECS direct-mapped DMA map with a uio.
|
||||
*/
|
||||
int
|
||||
apecs_bus_dmamap_load_uio_direct(t, map, uio, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_uio_direct_common(t, map, uio,
|
||||
flags, APECS_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an APECS SGMAP-mapped DMA map with a uio.
|
||||
*/
|
||||
|
@ -393,23 +340,6 @@ apecs_bus_dmamap_load_uio_sgmap(t, map, uio, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an APECS direct-mapped DMA map with raw memory.
|
||||
*/
|
||||
int
|
||||
apecs_bus_dmamap_load_raw_direct(t, map, segs, nsegs, size, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
bus_size_t size;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_raw_direct_common(t, map, segs, nsegs,
|
||||
size, flags, APECS_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an APECS SGMAP-mapped DMA map with raw memory.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cia_dma.c,v 1.6 1998/02/04 07:37:28 thorpej Exp $ */
|
||||
/* $NetBSD: cia_dma.c,v 1.7 1998/05/07 20:09:37 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: cia_dma.c,v 1.6 1998/02/04 07:37:28 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cia_dma.c,v 1.7 1998/05/07 20:09:37 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -63,23 +63,15 @@ int cia_bus_dmamap_create_sgmap __P((bus_dma_tag_t, bus_size_t, int,
|
|||
|
||||
void cia_bus_dmamap_destroy_sgmap __P((bus_dma_tag_t, bus_dmamap_t));
|
||||
|
||||
int cia_bus_dmamap_load_direct __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
int cia_bus_dmamap_load_sgmap __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
|
||||
int cia_bus_dmamap_load_mbuf_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
int cia_bus_dmamap_load_mbuf_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
|
||||
int cia_bus_dmamap_load_uio_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
int cia_bus_dmamap_load_uio_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
|
||||
int cia_bus_dmamap_load_raw_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
int cia_bus_dmamap_load_raw_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
|
||||
|
@ -117,13 +109,14 @@ cia_dma_init(ccp)
|
|||
*/
|
||||
t = &ccp->cc_dmat_direct;
|
||||
t->_cookie = ccp;
|
||||
t->_wbase = CIA_DIRECT_MAPPED_BASE;
|
||||
t->_get_tag = cia_dma_get_tag;
|
||||
t->_dmamap_create = _bus_dmamap_create;
|
||||
t->_dmamap_destroy = _bus_dmamap_destroy;
|
||||
t->_dmamap_load = cia_bus_dmamap_load_direct;
|
||||
t->_dmamap_load_mbuf = cia_bus_dmamap_load_mbuf_direct;
|
||||
t->_dmamap_load_uio = cia_bus_dmamap_load_uio_direct;
|
||||
t->_dmamap_load_raw = cia_bus_dmamap_load_raw_direct;
|
||||
t->_dmamap_load = _bus_dmamap_load_direct;
|
||||
t->_dmamap_load_mbuf = _bus_dmamap_load_mbuf_direct;
|
||||
t->_dmamap_load_uio = _bus_dmamap_load_uio_direct;
|
||||
t->_dmamap_load_raw = _bus_dmamap_load_raw_direct;
|
||||
t->_dmamap_unload = _bus_dmamap_unload;
|
||||
t->_dmamap_sync = _bus_dmamap_sync;
|
||||
|
||||
|
@ -138,6 +131,7 @@ cia_dma_init(ccp)
|
|||
*/
|
||||
t = &ccp->cc_dmat_sgmap;
|
||||
t->_cookie = ccp;
|
||||
t->_wbase = CIA_SGMAP_MAPPED_BASE;
|
||||
t->_get_tag = cia_dma_get_tag;
|
||||
t->_dmamap_create = cia_bus_dmamap_create_sgmap;
|
||||
t->_dmamap_destroy = cia_bus_dmamap_destroy_sgmap;
|
||||
|
@ -283,23 +277,6 @@ cia_bus_dmamap_destroy_sgmap(t, map)
|
|||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a CIA direct-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
int
|
||||
cia_bus_dmamap_load_direct(t, map, buf, buflen, p, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
void *buf;
|
||||
bus_size_t buflen;
|
||||
struct proc *p;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_direct_common(t, map, buf, buflen, p,
|
||||
flags, CIA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a CIA SGMAP-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
|
@ -323,21 +300,6 @@ cia_bus_dmamap_load_sgmap(t, map, buf, buflen, p, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a CIA direct-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
int
|
||||
cia_bus_dmamap_load_mbuf_direct(t, map, m, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct mbuf *m;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_mbuf_direct_common(t, map, m,
|
||||
flags, CIA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a CIA SGMAP-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
|
@ -358,21 +320,6 @@ cia_bus_dmamap_load_mbuf_sgmap(t, map, m, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a CIA direct-mapped DMA map with a uio.
|
||||
*/
|
||||
int
|
||||
cia_bus_dmamap_load_uio_direct(t, map, uio, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_uio_direct_common(t, map, uio,
|
||||
flags, CIA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a CIA SGMAP-mapped DMA map with a uio.
|
||||
*/
|
||||
|
@ -393,23 +340,6 @@ cia_bus_dmamap_load_uio_sgmap(t, map, uio, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a CIA direct-mapped DMA map with raw memory.
|
||||
*/
|
||||
int
|
||||
cia_bus_dmamap_load_raw_direct(t, map, segs, nsegs, size, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
bus_size_t size;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_raw_direct_common(t, map, segs, nsegs,
|
||||
size, flags, CIA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a CIA SGMAP-mapped DMA map with raw memory.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dwlpx_dma.c,v 1.7 1998/03/23 07:42:40 mjacob Exp $ */
|
||||
/* $NetBSD: dwlpx_dma.c,v 1.8 1998/05/07 20:09:37 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dwlpx_dma.c,v 1.7 1998/03/23 07:42:40 mjacob Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dwlpx_dma.c,v 1.8 1998/05/07 20:09:37 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -67,25 +67,15 @@ int dwlpx_bus_dmamap_create_sgmap __P((bus_dma_tag_t, bus_size_t, int,
|
|||
|
||||
void dwlpx_bus_dmamap_destroy_sgmap __P((bus_dma_tag_t, bus_dmamap_t));
|
||||
|
||||
int dwlpx_bus_dmamap_load_direct __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
|
||||
int dwlpx_bus_dmamap_load_sgmap __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
|
||||
int dwlpx_bus_dmamap_load_mbuf_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
|
||||
int dwlpx_bus_dmamap_load_mbuf_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
|
||||
int dwlpx_bus_dmamap_load_uio_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
int dwlpx_bus_dmamap_load_uio_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
|
||||
int dwlpx_bus_dmamap_load_raw_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
int dwlpx_bus_dmamap_load_raw_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
|
||||
|
@ -108,13 +98,14 @@ dwlpx_dma_init(ccp)
|
|||
*/
|
||||
t = &ccp->cc_dmat_direct;
|
||||
t->_cookie = ccp;
|
||||
t->_wbase = DWLPx_DIRECT_MAPPED_BASE;
|
||||
t->_get_tag = dwlpx_dma_get_tag;
|
||||
t->_dmamap_create = _bus_dmamap_create;
|
||||
t->_dmamap_destroy = _bus_dmamap_destroy;
|
||||
t->_dmamap_load = dwlpx_bus_dmamap_load_direct;
|
||||
t->_dmamap_load_mbuf = dwlpx_bus_dmamap_load_mbuf_direct;
|
||||
t->_dmamap_load_uio = dwlpx_bus_dmamap_load_uio_direct;
|
||||
t->_dmamap_load_raw = dwlpx_bus_dmamap_load_raw_direct;
|
||||
t->_dmamap_load = _bus_dmamap_load_direct;
|
||||
t->_dmamap_load_mbuf = _bus_dmamap_load_mbuf_direct;
|
||||
t->_dmamap_load_uio = _bus_dmamap_load_uio_direct;
|
||||
t->_dmamap_load_raw = _bus_dmamap_load_raw_direct;
|
||||
t->_dmamap_unload = _bus_dmamap_unload;
|
||||
t->_dmamap_sync = _bus_dmamap_sync;
|
||||
|
||||
|
@ -129,6 +120,7 @@ dwlpx_dma_init(ccp)
|
|||
*/
|
||||
t = &ccp->cc_dmat_sgmap;
|
||||
t->_cookie = ccp;
|
||||
t->_wbase = DWLPx_SG_MAPPED_BASE;
|
||||
t->_get_tag = dwlpx_dma_get_tag;
|
||||
t->_dmamap_create = dwlpx_bus_dmamap_create_sgmap;
|
||||
t->_dmamap_destroy = dwlpx_bus_dmamap_destroy_sgmap;
|
||||
|
@ -318,22 +310,6 @@ dwlpx_bus_dmamap_destroy_sgmap(t, map)
|
|||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a DWLPx direct-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
int
|
||||
dwlpx_bus_dmamap_load_direct(t, map, buf, buflen, p, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
void *buf;
|
||||
bus_size_t buflen;
|
||||
struct proc *p;
|
||||
int flags;
|
||||
{
|
||||
return (_bus_dmamap_load_direct_common(t, map, buf, buflen, p,
|
||||
flags, DWLPx_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a DWLPx SGMAP-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
|
@ -352,21 +328,6 @@ dwlpx_bus_dmamap_load_sgmap(t, map, buf, buflen, p, flags)
|
|||
&ccp->cc_sgmap));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a DWLPx direct-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
int
|
||||
dwlpx_bus_dmamap_load_mbuf_direct(t, map, m, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct mbuf *m;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_mbuf_direct_common(t, map, m,
|
||||
flags, DWLPx_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a DWLPx SGMAP-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
|
@ -382,21 +343,6 @@ dwlpx_bus_dmamap_load_mbuf_sgmap(t, map, m, flags)
|
|||
return (pci_sgmap_pte32_load_mbuf(t, map, m, flags, &ccp->cc_sgmap));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a DWLPx direct-mapped DMA map with a uio.
|
||||
*/
|
||||
int
|
||||
dwlpx_bus_dmamap_load_uio_direct(t, map, uio, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_uio_direct_common(t, map, uio,
|
||||
flags, DWLPx_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a DWLPx SGMAP-mapped DMA map with a uio.
|
||||
*/
|
||||
|
@ -412,23 +358,6 @@ dwlpx_bus_dmamap_load_uio_sgmap(t, map, uio, flags)
|
|||
return (pci_sgmap_pte32_load_uio(t, map, uio, flags, &ccp->cc_sgmap));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a DWLPx direct-mapped DMA map with raw memory.
|
||||
*/
|
||||
int
|
||||
dwlpx_bus_dmamap_load_raw_direct(t, map, segs, nsegs, size, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
bus_size_t size;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_raw_direct_common(t, map, segs, nsegs,
|
||||
size, flags, DWLPx_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a DWLPx SGMAP-mapped DMA map with raw memory.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lca_dma.c,v 1.7 1998/02/04 07:37:30 thorpej Exp $ */
|
||||
/* $NetBSD: lca_dma.c,v 1.8 1998/05/07 20:09:37 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: lca_dma.c,v 1.7 1998/02/04 07:37:30 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lca_dma.c,v 1.8 1998/05/07 20:09:37 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -63,23 +63,15 @@ int lca_bus_dmamap_create_sgmap __P((bus_dma_tag_t, bus_size_t, int,
|
|||
|
||||
void lca_bus_dmamap_destroy_sgmap __P((bus_dma_tag_t, bus_dmamap_t));
|
||||
|
||||
int lca_bus_dmamap_load_direct __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
int lca_bus_dmamap_load_sgmap __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
|
||||
int lca_bus_dmamap_load_mbuf_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
int lca_bus_dmamap_load_mbuf_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
|
||||
int lca_bus_dmamap_load_uio_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
int lca_bus_dmamap_load_uio_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
|
||||
int lca_bus_dmamap_load_raw_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
int lca_bus_dmamap_load_raw_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
|
||||
|
@ -116,13 +108,14 @@ lca_dma_init(lcp)
|
|||
*/
|
||||
t = &lcp->lc_dmat_direct;
|
||||
t->_cookie = lcp;
|
||||
t->_wbase = LCA_DIRECT_MAPPED_BASE;
|
||||
t->_get_tag = lca_dma_get_tag;
|
||||
t->_dmamap_create = _bus_dmamap_create;
|
||||
t->_dmamap_destroy = _bus_dmamap_destroy;
|
||||
t->_dmamap_load = lca_bus_dmamap_load_direct;
|
||||
t->_dmamap_load_mbuf = lca_bus_dmamap_load_mbuf_direct;
|
||||
t->_dmamap_load_uio = lca_bus_dmamap_load_uio_direct;
|
||||
t->_dmamap_load_raw = lca_bus_dmamap_load_raw_direct;
|
||||
t->_dmamap_load = _bus_dmamap_load_direct;
|
||||
t->_dmamap_load_mbuf = _bus_dmamap_load_mbuf_direct;
|
||||
t->_dmamap_load_uio = _bus_dmamap_load_uio_direct;
|
||||
t->_dmamap_load_raw = _bus_dmamap_load_raw_direct;
|
||||
t->_dmamap_unload = _bus_dmamap_unload;
|
||||
t->_dmamap_sync = _bus_dmamap_sync;
|
||||
|
||||
|
@ -137,6 +130,7 @@ lca_dma_init(lcp)
|
|||
*/
|
||||
t = &lcp->lc_dmat_sgmap;
|
||||
t->_cookie = lcp;
|
||||
t->_wbase = LCA_SGMAP_MAPPED_BASE;
|
||||
t->_get_tag = lca_dma_get_tag;
|
||||
t->_dmamap_create = lca_bus_dmamap_create_sgmap;
|
||||
t->_dmamap_destroy = lca_bus_dmamap_destroy_sgmap;
|
||||
|
@ -287,23 +281,6 @@ lca_bus_dmamap_destroy_sgmap(t, map)
|
|||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an LCA direct-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
int
|
||||
lca_bus_dmamap_load_direct(t, map, buf, buflen, p, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
void *buf;
|
||||
bus_size_t buflen;
|
||||
struct proc *p;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_direct_common(t, map, buf, buflen, p,
|
||||
flags, LCA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an LCA SGMAP-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
|
@ -327,21 +304,6 @@ lca_bus_dmamap_load_sgmap(t, map, buf, buflen, p, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an LCA direct-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
int
|
||||
lca_bus_dmamap_load_mbuf_direct(t, map, m, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct mbuf *m;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_mbuf_direct_common(t, map, m,
|
||||
flags, LCA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an LCA SGMAP-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
|
@ -362,21 +324,6 @@ lca_bus_dmamap_load_mbuf_sgmap(t, map, m, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an LCA direct-mapped DMA map with a uio.
|
||||
*/
|
||||
int
|
||||
lca_bus_dmamap_load_uio_direct(t, map, uio, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_uio_direct_common(t, map, uio,
|
||||
flags, LCA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an LCA SGMAP-mapped DMA map with a uio.
|
||||
*/
|
||||
|
@ -397,23 +344,6 @@ lca_bus_dmamap_load_uio_sgmap(t, map, uio, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an LCA direct-mapped DMA map with raw memory.
|
||||
*/
|
||||
int
|
||||
lca_bus_dmamap_load_raw_direct(t, map, segs, nsegs, size, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
bus_size_t size;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_raw_direct_common(t, map, segs, nsegs,
|
||||
size, flags, LCA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load an LCA SGMAP-mapped DMA map with raw memory.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mcpcia_dma.c,v 1.1 1998/04/15 00:50:14 mjacob Exp $ */
|
||||
/* $NetBSD: mcpcia_dma.c,v 1.2 1998/05/07 20:09:38 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcpcia_dma.c,v 1.1 1998/04/15 00:50:14 mjacob Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcpcia_dma.c,v 1.2 1998/05/07 20:09:38 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -65,25 +65,15 @@ int mcpcia_bus_dmamap_create_sgmap __P((bus_dma_tag_t, bus_size_t, int,
|
|||
|
||||
void mcpcia_bus_dmamap_destroy_sgmap __P((bus_dma_tag_t, bus_dmamap_t));
|
||||
|
||||
int mcpcia_bus_dmamap_load_direct __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
|
||||
int mcpcia_bus_dmamap_load_sgmap __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
|
||||
int mcpcia_bus_dmamap_load_mbuf_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
|
||||
int mcpcia_bus_dmamap_load_mbuf_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
|
||||
int mcpcia_bus_dmamap_load_uio_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
int mcpcia_bus_dmamap_load_uio_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
|
||||
int mcpcia_bus_dmamap_load_raw_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
int mcpcia_bus_dmamap_load_raw_sgmap __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
|
||||
|
@ -108,13 +98,14 @@ mcpcia_dma_init(ccp)
|
|||
*/
|
||||
t = &ccp->cc_dmat_direct;
|
||||
t->_cookie = ccp;
|
||||
t->_wbase = MCPCIA_DIRECT_MAPPED_BASE;
|
||||
t->_get_tag = mcpcia_dma_get_tag;
|
||||
t->_dmamap_create = _bus_dmamap_create;
|
||||
t->_dmamap_destroy = _bus_dmamap_destroy;
|
||||
t->_dmamap_load = mcpcia_bus_dmamap_load_direct;
|
||||
t->_dmamap_load_mbuf = mcpcia_bus_dmamap_load_mbuf_direct;
|
||||
t->_dmamap_load_uio = mcpcia_bus_dmamap_load_uio_direct;
|
||||
t->_dmamap_load_raw = mcpcia_bus_dmamap_load_raw_direct;
|
||||
t->_dmamap_load = _bus_dmamap_load_direct;
|
||||
t->_dmamap_load_mbuf = _bus_dmamap_load_mbuf_direct;
|
||||
t->_dmamap_load_uio = _bus_dmamap_load_uio_direct;
|
||||
t->_dmamap_load_raw = _bus_dmamap_load_raw_direct;
|
||||
t->_dmamap_unload = _bus_dmamap_unload;
|
||||
t->_dmamap_sync = _bus_dmamap_sync;
|
||||
|
||||
|
@ -129,6 +120,7 @@ mcpcia_dma_init(ccp)
|
|||
*/
|
||||
t = &ccp->cc_dmat_sgmap;
|
||||
t->_cookie = ccp;
|
||||
t->_wbase = MCPCIA_SG_MAPPED_BASE;
|
||||
t->_get_tag = mcpcia_dma_get_tag;
|
||||
t->_dmamap_create = mcpcia_bus_dmamap_create_sgmap;
|
||||
t->_dmamap_destroy = mcpcia_bus_dmamap_destroy_sgmap;
|
||||
|
@ -300,22 +292,6 @@ mcpcia_bus_dmamap_destroy_sgmap(t, map)
|
|||
_bus_dmamap_destroy(t, map);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a MCPCIA direct-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
int
|
||||
mcpcia_bus_dmamap_load_direct(t, map, buf, buflen, p, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
void *buf;
|
||||
bus_size_t buflen;
|
||||
struct proc *p;
|
||||
int flags;
|
||||
{
|
||||
return (_bus_dmamap_load_direct_common(t, map, buf, buflen, p,
|
||||
flags, MCPCIA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a MCPCIA SGMAP-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
|
@ -338,20 +314,6 @@ mcpcia_bus_dmamap_load_sgmap(t, map, buf, buflen, p, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a MCPCIA direct-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
int
|
||||
mcpcia_bus_dmamap_load_mbuf_direct(t, map, m, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct mbuf *m;
|
||||
int flags;
|
||||
{
|
||||
return (_bus_dmamap_load_mbuf_direct_common(t, map, m,
|
||||
flags, MCPCIA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a MCPCIA SGMAP-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
|
@ -371,20 +333,6 @@ mcpcia_bus_dmamap_load_mbuf_sgmap(t, map, m, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a MCPCIA direct-mapped DMA map with a uio.
|
||||
*/
|
||||
int
|
||||
mcpcia_bus_dmamap_load_uio_direct(t, map, uio, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
return (_bus_dmamap_load_uio_direct_common(t, map, uio,
|
||||
flags, MCPCIA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a MCPCIA SGMAP-mapped DMA map with a uio.
|
||||
*/
|
||||
|
@ -404,22 +352,6 @@ mcpcia_bus_dmamap_load_uio_sgmap(t, map, uio, flags)
|
|||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a MCPCIA direct-mapped DMA map with raw memory.
|
||||
*/
|
||||
int
|
||||
mcpcia_bus_dmamap_load_raw_direct(t, map, segs, nsegs, size, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
bus_size_t size;
|
||||
int flags;
|
||||
{
|
||||
return (_bus_dmamap_load_raw_direct_common(t, map, segs, nsegs,
|
||||
size, flags, MCPCIA_DIRECT_MAPPED_BASE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a MCPCIA SGMAP-mapped DMA map with raw memory.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tc_dma.c,v 1.5 1998/02/04 07:37:31 thorpej Exp $ */
|
||||
/* $NetBSD: tc_dma.c,v 1.6 1998/05/07 20:09:38 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: tc_dma.c,v 1.5 1998/02/04 07:37:31 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tc_dma.c,v 1.6 1998/05/07 20:09:38 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
|
@ -49,25 +49,16 @@ __KERNEL_RCSID(0, "$NetBSD: tc_dma.c,v 1.5 1998/02/04 07:37:31 thorpej Exp $");
|
|||
|
||||
#include <dev/tc/tcvar.h>
|
||||
|
||||
int tc_bus_dmamap_load_direct __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
int tc_bus_dmamap_load_mbuf_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct mbuf *, int));
|
||||
int tc_bus_dmamap_load_uio_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
struct uio *, int));
|
||||
int tc_bus_dmamap_load_raw_direct __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
|
||||
|
||||
struct alpha_bus_dma_tag tc_dmat_direct = {
|
||||
NULL, /* _cookie */
|
||||
0, /* _wbase */
|
||||
NULL, /* _get_tag */
|
||||
_bus_dmamap_create,
|
||||
_bus_dmamap_destroy,
|
||||
tc_bus_dmamap_load_direct,
|
||||
tc_bus_dmamap_load_mbuf_direct,
|
||||
tc_bus_dmamap_load_uio_direct,
|
||||
tc_bus_dmamap_load_raw_direct,
|
||||
_bus_dmamap_load_direct,
|
||||
_bus_dmamap_load_mbuf_direct,
|
||||
_bus_dmamap_load_uio_direct,
|
||||
_bus_dmamap_load_raw_direct,
|
||||
_bus_dmamap_unload,
|
||||
_bus_dmamap_sync,
|
||||
_bus_dmamem_alloc,
|
||||
|
@ -88,67 +79,3 @@ tc_dma_init()
|
|||
} /* XXX */
|
||||
/* XXX XXX END XXX XXX */
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a TurboChannel direct-mapped DMA map with a linear buffer.
|
||||
*/
|
||||
int
|
||||
tc_bus_dmamap_load_direct(t, map, buf, buflen, p, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
void *buf;
|
||||
bus_size_t buflen;
|
||||
struct proc *p;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_direct_common(t, map, buf, buflen, p,
|
||||
flags, 0));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a TurboChannel direct-mapped DMA map with an mbuf chain.
|
||||
*/
|
||||
int
|
||||
tc_bus_dmamap_load_mbuf_direct(t, map, m, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct mbuf *m;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_mbuf_direct_common(t, map, m,
|
||||
flags, 0));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a TurboChannel direct-mapped DMA map with a uio.
|
||||
*/
|
||||
int
|
||||
tc_bus_dmamap_load_uio_direct(t, map, uio, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_uio_direct_common(t, map, uio,
|
||||
flags, 0));
|
||||
}
|
||||
|
||||
/*
|
||||
* Load a TurboChannel direct-mapped DMA map with raw memory.
|
||||
*/
|
||||
int
|
||||
tc_bus_dmamap_load_raw_direct(t, map, segs, nsegs, size, flags)
|
||||
bus_dma_tag_t t;
|
||||
bus_dmamap_t map;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
bus_size_t size;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (_bus_dmamap_load_raw_direct_common(t, map, segs, nsegs,
|
||||
size, flags, 0));
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tc_dma_3000_500.c,v 1.5 1998/02/04 07:37:31 thorpej Exp $ */
|
||||
/* $NetBSD: tc_dma_3000_500.c,v 1.6 1998/05/07 20:09:38 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: tc_dma_3000_500.c,v 1.5 1998/02/04 07:37:31 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tc_dma_3000_500.c,v 1.6 1998/05/07 20:09:38 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -56,6 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: tc_dma_3000_500.c,v 1.5 1998/02/04 07:37:31 thorpej
|
|||
|
||||
struct alpha_bus_dma_tag tc_dmat_sgmap = {
|
||||
NULL, /* _cookie */
|
||||
0, /* _wbase */
|
||||
NULL, /* _get_tag */
|
||||
tc_bus_dmamap_create_sgmap,
|
||||
tc_bus_dmamap_destroy_sgmap,
|
||||
|
|
Loading…
Reference in New Issue