1*aad6ef8bSmartin /* $NetBSD: sifvar.h,v 1.4 2014/03/31 11:25:49 martin Exp $ */ 2*aad6ef8bSmartin 3*aad6ef8bSmartin /*- 4*aad6ef8bSmartin * Copyright (c) 2001 The NetBSD Foundation, Inc. 5*aad6ef8bSmartin * All rights reserved. 6*aad6ef8bSmartin * 7*aad6ef8bSmartin * This code is derived from software contributed to The NetBSD Foundation 8*aad6ef8bSmartin * by UCHIYAMA Yasushi. 9*aad6ef8bSmartin * 10*aad6ef8bSmartin * Redistribution and use in source and binary forms, with or without 11*aad6ef8bSmartin * modification, are permitted provided that the following conditions 12*aad6ef8bSmartin * are met: 13*aad6ef8bSmartin * 1. Redistributions of source code must retain the above copyright 14*aad6ef8bSmartin * notice, this list of conditions and the following disclaimer. 15*aad6ef8bSmartin * 2. Redistributions in binary form must reproduce the above copyright 16*aad6ef8bSmartin * notice, this list of conditions and the following disclaimer in the 17*aad6ef8bSmartin * documentation and/or other materials provided with the distribution. 18*aad6ef8bSmartin * 19*aad6ef8bSmartin * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20*aad6ef8bSmartin * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21*aad6ef8bSmartin * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22*aad6ef8bSmartin * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23*aad6ef8bSmartin * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24*aad6ef8bSmartin * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25*aad6ef8bSmartin * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26*aad6ef8bSmartin * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27*aad6ef8bSmartin * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28*aad6ef8bSmartin * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29*aad6ef8bSmartin * POSSIBILITY OF SUCH DAMAGE. 30*aad6ef8bSmartin */ 31*aad6ef8bSmartin 32*aad6ef8bSmartin struct iopdma_segment { 33*aad6ef8bSmartin size_t size; 34*aad6ef8bSmartin paddr_t iop_paddr; 35*aad6ef8bSmartin vaddr_t ee_vaddr; 36*aad6ef8bSmartin }; 37*aad6ef8bSmartin 38*aad6ef8bSmartin void sif_init(void); 39*aad6ef8bSmartin void sif_exit(void); 40*aad6ef8bSmartin 41*aad6ef8bSmartin /* IOP DMA */ 42*aad6ef8bSmartin int iopdma_allocate_buffer(struct iopdma_segment *, size_t size); 43*aad6ef8bSmartin void iopdma_free_buffer(struct iopdma_segment *); 44