xref: /netbsd-src/sys/arch/arm/at91/at91_bus_dma.c (revision 934f5fa97ba9f772a8caecfcac7ee201f35bb856)
1 /*	$NetBSD: at91_bus_dma.c,v 1.6 2020/06/17 06:48:06 thorpej 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  *
16  * THIS SOFTWARE IS PROVIDED BY FUJITSU COMPONENT LIMITED AND GENETEC
17  * CORPORATION ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
18  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  * DISCLAIMED.  IN NO EVENT SHALL FUJITSU COMPONENT LIMITED OR GENETEC
21  * CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
27  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28  * SUCH DAMAGE.
29  */
30 
31 /*
32  * bus_dma tag for EP93xx CPUs
33  */
34 
35 #include <sys/cdefs.h>
36 __KERNEL_RCSID(0, "$NetBSD: at91_bus_dma.c,v 1.6 2020/06/17 06:48:06 thorpej Exp $");
37 
38 #include <sys/param.h>
39 #include <sys/types.h>
40 #include <sys/device.h>
41 #include <sys/systm.h>
42 
43 #define _ARM32_BUS_DMA_PRIVATE
44 #include <sys/bus.h>
45 
46 #include <arm/at91/at91var.h>
47 
48 struct arm32_bus_dma_tag at91_bd_tag = {
49 	_BUS_DMAMAP_FUNCS,
50 	_BUS_DMAMEM_FUNCS,
51 	_BUS_DMAMAP_FUNCS,
52 };
53