diff options
Diffstat (limited to 'sys/arch/alpha/pci/cia_dma.c')
-rw-r--r-- | sys/arch/alpha/pci/cia_dma.c | 60 |
1 files changed, 3 insertions, 57 deletions
diff --git a/sys/arch/alpha/pci/cia_dma.c b/sys/arch/alpha/pci/cia_dma.c index 56413640d07..37394c9e799 100644 --- a/sys/arch/alpha/pci/cia_dma.c +++ b/sys/arch/alpha/pci/cia_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cia_dma.c,v 1.5 2003/10/18 20:14:42 jmc Exp $ */ +/* $OpenBSD: cia_dma.c,v 1.6 2006/03/20 01:00:58 martin Exp $ */ /* $NetBSD: cia_dma.c,v 1.16 2000/06/29 08:58:46 mrg Exp $ */ /*- @@ -64,11 +64,6 @@ bus_dma_tag_t cia_dma_get_tag(bus_dma_tag_t, alpha_bus_t); int cia_bus_dmamap_create_direct(bus_dma_tag_t, bus_size_t, int, bus_size_t, bus_size_t, int, bus_dmamap_t *); -int cia_bus_dmamap_create_sgmap(bus_dma_tag_t, bus_size_t, int, - bus_size_t, bus_size_t, int, bus_dmamap_t *); - -void cia_bus_dmamap_destroy_sgmap(bus_dma_tag_t, bus_dmamap_t); - int cia_bus_dmamap_load_sgmap(bus_dma_tag_t, bus_dmamap_t, void *, bus_size_t, struct proc *, int); @@ -150,8 +145,8 @@ cia_dma_init(ccp) t->_boundary = 0; t->_sgmap = &ccp->cc_sgmap; t->_get_tag = cia_dma_get_tag; - t->_dmamap_create = cia_bus_dmamap_create_sgmap; - t->_dmamap_destroy = cia_bus_dmamap_destroy_sgmap; + t->_dmamap_create = alpha_sgmap_dmamap_create; + t->_dmamap_destroy = alpha_sgmap_dmamap_destroy; t->_dmamap_load = cia_bus_dmamap_load_sgmap; t->_dmamap_load_mbuf = cia_bus_dmamap_load_mbuf_sgmap; t->_dmamap_load_uio = cia_bus_dmamap_load_uio_sgmap; @@ -335,55 +330,6 @@ cia_bus_dmamap_create_direct(t, size, nsegments, maxsegsz, boundary, } /* - * Create a CIA SGMAP-mapped DMA map. - */ -int -cia_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) - cia_bus_dmamap_destroy_sgmap(t, map); - } - - return (error); -} - -/* - * Destroy a CIA SGMAP-mapped DMA map. - */ -void -cia_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); -} - -/* * Load a CIA SGMAP-mapped DMA map with a linear buffer. */ int |