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