11.1Schristos/* $NetBSD: bus_dmamem_common.h,v 1.1 2012/10/02 23:39:43 christos Exp $ */ 21.1Schristos 31.1Schristos/*- 41.1Schristos * Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc. 51.1Schristos * All rights reserved. 61.1Schristos * 71.1Schristos * This code is derived from software contributed to The NetBSD Foundation 81.1Schristos * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 91.1Schristos * NASA Ames Research Center. 101.1Schristos * 111.1Schristos * Redistribution and use in source and binary forms, with or without 121.1Schristos * modification, are permitted provided that the following conditions 131.1Schristos * are met: 141.1Schristos * 1. Redistributions of source code must retain the above copyright 151.1Schristos * notice, this list of conditions and the following disclaimer. 161.1Schristos * 2. Redistributions in binary form must reproduce the above copyright 171.1Schristos * notice, this list of conditions and the following disclaimer in the 181.1Schristos * documentation and/or other materials provided with the distribution. 191.1Schristos * 201.1Schristos * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 211.1Schristos * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 221.1Schristos * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 231.1Schristos * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 241.1Schristos * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 251.1Schristos * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 261.1Schristos * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 271.1Schristos * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 281.1Schristos * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 291.1Schristos * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 301.1Schristos * POSSIBILITY OF SUCH DAMAGE. 311.1Schristos */ 321.1Schristos 331.1Schristos#ifndef _COMMON_BUS_DMAMEM_COMMON_H_ 341.1Schristos#define _COMMON_BUS_DMAMEM_COMMON_H_ 351.1Schristos 361.1Schristos#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ 371.1Schristos 381.1Schristosint _bus_dmamem_alloc_range_common(bus_dma_tag_t, bus_size_t, 391.1Schristos bus_size_t, bus_size_t, 401.1Schristos bus_dma_segment_t *, 411.1Schristos int, int *, int, 421.1Schristos paddr_t, paddr_t); 431.1Schristosvoid _bus_dmamem_free_common(bus_dma_tag_t, bus_dma_segment_t *, 441.1Schristos int); 451.1Schristos 461.1Schristosint _bus_dmamem_map_common(bus_dma_tag_t, bus_dma_segment_t *, int, 471.1Schristos size_t, void **, int, int); 481.1Schristosvoid _bus_dmamem_unmap_common(bus_dma_tag_t, void *, size_t); 491.1Schristos 501.1Schristosbus_addr_t _bus_dmamem_mmap_common(bus_dma_tag_t, bus_dma_segment_t *, 511.1Schristos int, off_t, int, int); 521.1Schristos 531.1Schristos#endif /* _COMMON_BUS_DMAMEM_COMMON_H_ */ 54