1255643Snwhitehorn/*- 2255643Snwhitehorn * Copyright (c) 2013, Nathan Whitehorn <nwhitehorn@FreeBSD.org> 3255643Snwhitehorn * All rights reserved. 4255643Snwhitehorn * 5255643Snwhitehorn * Redistribution and use in source and binary forms, with or without 6255643Snwhitehorn * modification, are permitted provided that the following conditions 7255643Snwhitehorn * are met: 8255643Snwhitehorn * 1. Redistributions of source code must retain the above copyright 9255643Snwhitehorn * notice unmodified, this list of conditions, and the following 10255643Snwhitehorn * disclaimer. 11255643Snwhitehorn * 2. Redistributions in binary form must reproduce the above copyright 12255643Snwhitehorn * notice, this list of conditions and the following disclaimer in the 13255643Snwhitehorn * documentation and/or other materials provided with the distribution. 14255643Snwhitehorn * 15255643Snwhitehorn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16255643Snwhitehorn * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17255643Snwhitehorn * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18255643Snwhitehorn * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19255643Snwhitehorn * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20255643Snwhitehorn * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21255643Snwhitehorn * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22255643Snwhitehorn * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23255643Snwhitehorn * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24255643Snwhitehorn * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25255643Snwhitehorn * 26255643Snwhitehorn * $FreeBSD: releng/11.0/sys/powerpc/pseries/plpar_iommu.h 255643 2013-09-17 17:37:04Z nwhitehorn $ 27255643Snwhitehorn */ 28255643Snwhitehorn 29255643Snwhitehorn#ifndef _PSERIES_PHYP_IOMMU_H_ 30255643Snwhitehorn#define _PSERIES_PHYP_IOMMU_H_ 31255643Snwhitehorn 32255643Snwhitehorn#include <sys/types.h> 33255643Snwhitehorn#include <sys/bus_dma.h> 34255643Snwhitehorn 35255643Snwhitehornint phyp_iommu_set_dma_tag(device_t dev, device_t child, bus_dma_tag_t tag); 36255643Snwhitehornint phyp_iommu_map(device_t dev, bus_dma_segment_t *segs, int *nsegs, 37255643Snwhitehorn bus_addr_t min, bus_addr_t max, bus_size_t alignment, bus_addr_t boundary, 38255643Snwhitehorn void *cookie); 39255643Snwhitehornint phyp_iommu_unmap(device_t dev, bus_dma_segment_t *segs, int nsegs, 40255643Snwhitehorn void *cookie); 41255643Snwhitehorn 42255643Snwhitehorn#endif 43255643Snwhitehorn 44