pxa2x0_dma.c revision 1.1.2.2 1 1.1.2.2 nathanw /* $NetBSD: pxa2x0_dma.c,v 1.1.2.2 2002/11/11 21:56:56 nathanw Exp $ */
2 1.1.2.2 nathanw
3 1.1.2.2 nathanw /*
4 1.1.2.2 nathanw * Copyright (c) 2002 Genetec Corporation. All rights reserved.
5 1.1.2.2 nathanw * Written by Hiroyuki Bessho for Genetec Corporation.
6 1.1.2.2 nathanw *
7 1.1.2.2 nathanw * Redistribution and use in source and binary forms, with or without
8 1.1.2.2 nathanw * modification, are permitted provided that the following conditions
9 1.1.2.2 nathanw * are met:
10 1.1.2.2 nathanw * 1. Redistributions of source code must retain the above copyright
11 1.1.2.2 nathanw * notice, this list of conditions and the following disclaimer.
12 1.1.2.2 nathanw * 2. Redistributions in binary form must reproduce the above copyright
13 1.1.2.2 nathanw * notice, this list of conditions and the following disclaimer in the
14 1.1.2.2 nathanw * documentation and/or other materials provided with the distribution.
15 1.1.2.2 nathanw * 3. All advertising materials mentioning features or use of this software
16 1.1.2.2 nathanw * must display the following acknowledgement:
17 1.1.2.2 nathanw * This product includes software developed for the NetBSD Project by
18 1.1.2.2 nathanw * Genetec Corporation.
19 1.1.2.2 nathanw * 4. The name of Genetec Corporation may not be used to endorse or
20 1.1.2.2 nathanw * promote products derived from this software without specific prior
21 1.1.2.2 nathanw * written permission.
22 1.1.2.2 nathanw *
23 1.1.2.2 nathanw * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND
24 1.1.2.2 nathanw * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25 1.1.2.2 nathanw * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 1.1.2.2 nathanw * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENETEC CORPORATION
27 1.1.2.2 nathanw * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 1.1.2.2 nathanw * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 1.1.2.2 nathanw * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 1.1.2.2 nathanw * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 1.1.2.2 nathanw * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 1.1.2.2 nathanw * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 1.1.2.2 nathanw * POSSIBILITY OF SUCH DAMAGE.
34 1.1.2.2 nathanw */
35 1.1.2.2 nathanw
36 1.1.2.2 nathanw /*
37 1.1.2.2 nathanw * bus dma tag for PXA2[15]0 processor.
38 1.1.2.2 nathanw * (Currently used only for LCD frame buffer)
39 1.1.2.2 nathanw */
40 1.1.2.2 nathanw
41 1.1.2.2 nathanw #include <sys/param.h>
42 1.1.2.2 nathanw #include <sys/systm.h>
43 1.1.2.2 nathanw #include <sys/device.h>
44 1.1.2.2 nathanw #include <sys/malloc.h>
45 1.1.2.2 nathanw #include <sys/mbuf.h>
46 1.1.2.2 nathanw
47 1.1.2.2 nathanw #include <uvm/uvm_extern.h>
48 1.1.2.2 nathanw
49 1.1.2.2 nathanw #define _ARM32_BUS_DMA_PRIVATE
50 1.1.2.2 nathanw #include <machine/bus.h>
51 1.1.2.2 nathanw
52 1.1.2.2 nathanw struct arm32_bus_dma_tag pxa2x0_bus_dma_tag = {
53 1.1.2.2 nathanw 0,
54 1.1.2.2 nathanw 0,
55 1.1.2.2 nathanw _bus_dmamap_create,
56 1.1.2.2 nathanw _bus_dmamap_destroy,
57 1.1.2.2 nathanw _bus_dmamap_load,
58 1.1.2.2 nathanw _bus_dmamap_load_mbuf,
59 1.1.2.2 nathanw _bus_dmamap_load_uio,
60 1.1.2.2 nathanw _bus_dmamap_load_raw,
61 1.1.2.2 nathanw _bus_dmamap_unload,
62 1.1.2.2 nathanw _bus_dmamap_sync,
63 1.1.2.2 nathanw NULL, /* sync_post */
64 1.1.2.2 nathanw _bus_dmamem_alloc,
65 1.1.2.2 nathanw _bus_dmamem_free,
66 1.1.2.2 nathanw _bus_dmamem_map,
67 1.1.2.2 nathanw _bus_dmamem_unmap,
68 1.1.2.2 nathanw _bus_dmamem_mmap
69 1.1.2.2 nathanw };
70 1.1.2.2 nathanw
71