ep93xx_busdma.c revision 1.1 1 1.1 joff /* $NetBSD: ep93xx_busdma.c,v 1.1 2004/12/22 19:14:11 joff Exp $ */
2 1.1 joff
3 1.1 joff /*
4 1.1 joff * Copyright (c) 2004 Jesse Off
5 1.1 joff * All rights reserved.
6 1.1 joff *
7 1.1 joff * Redistribution and use in source and binary forms, with or without
8 1.1 joff * modification, are permitted provided that the following conditions
9 1.1 joff * are met:
10 1.1 joff * 1. Redistributions of source code must retain the above copyright
11 1.1 joff * notice, this list of conditions and the following disclaimer.
12 1.1 joff * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 joff * notice, this list of conditions and the following disclaimer in the
14 1.1 joff * documentation and/or other materials provided with the distribution.
15 1.1 joff * 3. Neither the name of The Fujitsu Component Limited nor the name of
16 1.1 joff * Genetec corporation may not be used to endorse or promote products
17 1.1 joff * derived from this software without specific prior written permission.
18 1.1 joff *
19 1.1 joff * THIS SOFTWARE IS PROVIDED BY FUJITSU COMPONENT LIMITED AND GENETEC
20 1.1 joff * CORPORATION ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21 1.1 joff * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 1.1 joff * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 1.1 joff * DISCLAIMED. IN NO EVENT SHALL FUJITSU COMPONENT LIMITED OR GENETEC
24 1.1 joff * CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 1.1 joff * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 1.1 joff * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
27 1.1 joff * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28 1.1 joff * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 1.1 joff * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30 1.1 joff * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 1.1 joff * SUCH DAMAGE.
32 1.1 joff */
33 1.1 joff
34 1.1 joff /*
35 1.1 joff * bus_dma tag for EP93xx CPUs
36 1.1 joff */
37 1.1 joff
38 1.1 joff #include <sys/cdefs.h>
39 1.1 joff __KERNEL_RCSID(0, "$NetBSD: ep93xx_busdma.c,v 1.1 2004/12/22 19:14:11 joff Exp $");
40 1.1 joff
41 1.1 joff #include <sys/param.h>
42 1.1 joff #include <sys/types.h>
43 1.1 joff #include <sys/device.h>
44 1.1 joff #include <sys/systm.h>
45 1.1 joff #include <sys/extent.h>
46 1.1 joff
47 1.1 joff #define _ARM32_BUS_DMA_PRIVATE
48 1.1 joff #include <machine/bus.h>
49 1.1 joff
50 1.1 joff #include <arm/ep93xx/ep93xxvar.h>
51 1.1 joff
52 1.1 joff struct arm32_bus_dma_tag ep93xx_bus_dma = {
53 1.1 joff NULL, /* _ranges: set by platform specific routine */
54 1.1 joff 0, /* _nranges */
55 1.1 joff
56 1.1 joff NULL, /* _cookie */
57 1.1 joff
58 1.1 joff _bus_dmamap_create,
59 1.1 joff _bus_dmamap_destroy,
60 1.1 joff _bus_dmamap_load,
61 1.1 joff _bus_dmamap_load_mbuf,
62 1.1 joff _bus_dmamap_load_uio,
63 1.1 joff _bus_dmamap_load_raw,
64 1.1 joff _bus_dmamap_unload,
65 1.1 joff _bus_dmamap_sync,
66 1.1 joff NULL, /* sync_post */
67 1.1 joff
68 1.1 joff _bus_dmamem_alloc,
69 1.1 joff _bus_dmamem_free,
70 1.1 joff _bus_dmamem_map,
71 1.1 joff _bus_dmamem_unmap,
72 1.1 joff _bus_dmamem_mmap,
73 1.1 joff };
74