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