diff options
Diffstat (limited to 'sys/arch/alpha/pci/apecs_dma.c')
-rw-r--r-- | sys/arch/alpha/pci/apecs_dma.c | 60 |
1 files changed, 3 insertions, 57 deletions
diff --git a/sys/arch/alpha/pci/apecs_dma.c b/sys/arch/alpha/pci/apecs_dma.c index 3442f194e73..a4ba8c61253 100644 --- a/sys/arch/alpha/pci/apecs_dma.c +++ b/sys/arch/alpha/pci/apecs_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apecs_dma.c,v 1.3 2002/03/14 01:26:27 millert Exp $ */ +/* $OpenBSD: apecs_dma.c,v 1.4 2006/03/20 01:00:58 martin Exp $ */ /* $NetBSD: apecs_dma.c,v 1.13 2000/06/29 08:58:45 mrg Exp $ */ /*- @@ -61,11 +61,6 @@ bus_dma_tag_t apecs_dma_get_tag(bus_dma_tag_t, alpha_bus_t); -int apecs_bus_dmamap_create_sgmap(bus_dma_tag_t, bus_size_t, int, - bus_size_t, bus_size_t, int, bus_dmamap_t *); - -void apecs_bus_dmamap_destroy_sgmap(bus_dma_tag_t, bus_dmamap_t); - int apecs_bus_dmamap_load_sgmap(bus_dma_tag_t, bus_dmamap_t, void *, bus_size_t, struct proc *, int); @@ -146,8 +141,8 @@ apecs_dma_init(acp) t->_boundary = 0; t->_sgmap = &acp->ac_sgmap; t->_get_tag = apecs_dma_get_tag; - t->_dmamap_create = apecs_bus_dmamap_create_sgmap; - t->_dmamap_destroy = apecs_bus_dmamap_destroy_sgmap; + t->_dmamap_create = alpha_sgmap_dmamap_create; + t->_dmamap_destroy = alpha_sgmap_dmamap_destroy; t->_dmamap_load = apecs_bus_dmamap_load_sgmap; t->_dmamap_load_mbuf = apecs_bus_dmamap_load_mbuf_sgmap; t->_dmamap_load_uio = apecs_bus_dmamap_load_uio_sgmap; @@ -340,52 +335,3 @@ apecs_bus_dmamap_unload_sgmap(t, map) */ _bus_dmamap_unload(t, map); } - -/* - * Create a APECS SGMAP-mapped DMA map. - */ -int -apecs_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) - apecs_bus_dmamap_destroy_sgmap(t, map); - } - - return (error); -} - -/* - * Destroy a APECS SGMAP-mapped DMA map. - */ -void -apecs_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); -} |