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