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