summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/pci/lca_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/alpha/pci/lca_dma.c')
-rw-r--r--sys/arch/alpha/pci/lca_dma.c60
1 files changed, 3 insertions, 57 deletions
diff --git a/sys/arch/alpha/pci/lca_dma.c b/sys/arch/alpha/pci/lca_dma.c
index 25d1f0ed16f..a6c4f293f4c 100644
--- a/sys/arch/alpha/pci/lca_dma.c
+++ b/sys/arch/alpha/pci/lca_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lca_dma.c,v 1.5 2003/10/18 20:14:42 jmc Exp $ */
+/* $OpenBSD: lca_dma.c,v 1.6 2006/03/20 01:00:58 martin Exp $ */
/* $NetBSD: lca_dma.c,v 1.13 2000/06/29 08:58:47 mrg Exp $ */
/*-
@@ -61,11 +61,6 @@
bus_dma_tag_t lca_dma_get_tag(bus_dma_tag_t, alpha_bus_t);
-int lca_bus_dmamap_create_sgmap(bus_dma_tag_t, bus_size_t, int,
- bus_size_t, bus_size_t, int, bus_dmamap_t *);
-
-void lca_bus_dmamap_destroy_sgmap(bus_dma_tag_t, bus_dmamap_t);
-
int lca_bus_dmamap_load_sgmap(bus_dma_tag_t, bus_dmamap_t, void *,
bus_size_t, struct proc *, int);
@@ -145,9 +140,9 @@ lca_dma_init(lcp)
t->_boundary = 0;
t->_sgmap = &lcp->lc_sgmap;
t->_get_tag = lca_dma_get_tag;
- t->_dmamap_create = lca_bus_dmamap_create_sgmap;
+ t->_dmamap_create = alpha_sgmap_dmamap_create;
- t->_dmamap_destroy = lca_bus_dmamap_destroy_sgmap;
+ t->_dmamap_destroy = alpha_sgmap_dmamap_destroy;
t->_dmamap_load = lca_bus_dmamap_load_sgmap;
t->_dmamap_load_mbuf = lca_bus_dmamap_load_mbuf_sgmap;
t->_dmamap_load_uio = lca_bus_dmamap_load_uio_sgmap;
@@ -344,52 +339,3 @@ lca_bus_dmamap_unload_sgmap(t, map)
*/
_bus_dmamap_unload(t, map);
}
-
-/*
- * Create a LCA SGMAP-mapped DMA map.
- */
-int
-lca_bus_dmamap_create_sgmap(t, size, nsegments, maxsegsz, boundary,
- flags, dmamp)
- bus_dma_tag_t t;
- bus_size_t size;
- int nsegments;
- bus_size_t maxsegsz;
- bus_size_t boundary;
- int flags;
- bus_dmamap_t *dmamp;
-{
- bus_dmamap_t map;
- int error;
-
- error = _bus_dmamap_create(t, size, nsegments, maxsegsz,
- boundary, flags, dmamp);
- if (error)
- return (error);
-
- map = *dmamp;
-
- if (flags & BUS_DMA_ALLOCNOW) {
- error = alpha_sgmap_alloc(map, round_page(size),
- t->_sgmap, flags);
- if (error)
- lca_bus_dmamap_destroy_sgmap(t, map);
- }
-
- return (error);
-}
-
-/*
- * Destroy a LCA SGMAP-mapped DMA map.
- */
-void
-lca_bus_dmamap_destroy_sgmap(t, map)
- bus_dma_tag_t t;
- bus_dmamap_t map;
-{
-
- if (map->_dm_flags & DMAMAP_HAS_SGMAP)
- alpha_sgmap_free(map, t->_sgmap);
-
- _bus_dmamap_destroy(t, map);
-}