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