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