1*f82ca6eeSskrll /* $NetBSD: gemini_dma.c,v 1.4 2022/09/27 06:36:41 skrll Exp $ */ 2f5d7ce3dSmatt 3f5d7ce3dSmatt /* adapted from: 4f5d7ce3dSmatt * NetBSD: pxa2x0_dma.c,v 1.4 2005/12/11 12:16:51 christos Exp 5f5d7ce3dSmatt */ 6f5d7ce3dSmatt 7f5d7ce3dSmatt /* 8f5d7ce3dSmatt * Copyright (c) 2002 Genetec Corporation. All rights reserved. 9f5d7ce3dSmatt * Written by Hiroyuki Bessho for Genetec Corporation. 10f5d7ce3dSmatt * 11f5d7ce3dSmatt * Redistribution and use in source and binary forms, with or without 12f5d7ce3dSmatt * modification, are permitted provided that the following conditions 13f5d7ce3dSmatt * are met: 14f5d7ce3dSmatt * 1. Redistributions of source code must retain the above copyright 15f5d7ce3dSmatt * notice, this list of conditions and the following disclaimer. 16f5d7ce3dSmatt * 2. Redistributions in binary form must reproduce the above copyright 17f5d7ce3dSmatt * notice, this list of conditions and the following disclaimer in the 18f5d7ce3dSmatt * documentation and/or other materials provided with the distribution. 19f5d7ce3dSmatt * 3. All advertising materials mentioning features or use of this software 20f5d7ce3dSmatt * must display the following acknowledgement: 21f5d7ce3dSmatt * This product includes software developed for the NetBSD Project by 22f5d7ce3dSmatt * Genetec Corporation. 23f5d7ce3dSmatt * 4. The name of Genetec Corporation may not be used to endorse or 24f5d7ce3dSmatt * promote products derived from this software without specific prior 25f5d7ce3dSmatt * written permission. 26f5d7ce3dSmatt * 27f5d7ce3dSmatt * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND 28f5d7ce3dSmatt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 29f5d7ce3dSmatt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 30f5d7ce3dSmatt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENETEC CORPORATION 31f5d7ce3dSmatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 32f5d7ce3dSmatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 33f5d7ce3dSmatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34f5d7ce3dSmatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35f5d7ce3dSmatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36f5d7ce3dSmatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37f5d7ce3dSmatt * POSSIBILITY OF SUCH DAMAGE. 38f5d7ce3dSmatt */ 39f5d7ce3dSmatt 40f5d7ce3dSmatt /* 41f5d7ce3dSmatt * bus dma tag for PXA2[15]0 processor. 42f5d7ce3dSmatt * (Currently used only for LCD frame buffer) 43f5d7ce3dSmatt */ 44f5d7ce3dSmatt 45f5d7ce3dSmatt #include <sys/cdefs.h> 46*f82ca6eeSskrll __KERNEL_RCSID(0, "$NetBSD: gemini_dma.c,v 1.4 2022/09/27 06:36:41 skrll Exp $"); 47f5d7ce3dSmatt 48f5d7ce3dSmatt #include <sys/param.h> 49f5d7ce3dSmatt #include <sys/systm.h> 50f5d7ce3dSmatt #include <sys/device.h> 51f5d7ce3dSmatt #include <sys/mbuf.h> 52f5d7ce3dSmatt 53f5d7ce3dSmatt #include <uvm/uvm_extern.h> 54f5d7ce3dSmatt 55f5d7ce3dSmatt #define _ARM32_BUS_DMA_PRIVATE 56cf10107dSdyoung #include <sys/bus.h> 57f5d7ce3dSmatt 58f5d7ce3dSmatt struct arm32_bus_dma_tag gemini_bus_dma_tag = { 594710b77fSmatt _BUS_DMAMAP_FUNCS, 604710b77fSmatt _BUS_DMAMEM_FUNCS, 614710b77fSmatt _BUS_DMATAG_FUNCS, 62f5d7ce3dSmatt }; 63f5d7ce3dSmatt 64