plpar_iommu.h revision 255643
166550Snyan/*- 266550Snyan * Copyright (c) 2013, Nathan Whitehorn <nwhitehorn@FreeBSD.org> 366550Snyan * All rights reserved. 4139749Simp * 5139749Simp * Redistribution and use in source and binary forms, with or without 666550Snyan * modification, are permitted provided that the following conditions 766550Snyan * are met: 866550Snyan * 1. Redistributions of source code must retain the above copyright 966550Snyan * notice unmodified, this list of conditions, and the following 1066550Snyan * disclaimer. 1166550Snyan * 2. Redistributions in binary form must reproduce the above copyright 1266550Snyan * notice, this list of conditions and the following disclaimer in the 1366550Snyan * documentation and/or other materials provided with the distribution. 1466550Snyan * 1566550Snyan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1666550Snyan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1766550Snyan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1866550Snyan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1966550Snyan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2066550Snyan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2166550Snyan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2266550Snyan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2366550Snyan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2466550Snyan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2566550Snyan * 2666550Snyan * $FreeBSD: head/sys/powerpc/pseries/plpar_iommu.h 255643 2013-09-17 17:37:04Z nwhitehorn $ 2766550Snyan */ 2866550Snyan 2966550Snyan#ifndef _PSERIES_PHYP_IOMMU_H_ 3066550Snyan#define _PSERIES_PHYP_IOMMU_H_ 3166550Snyan 3266550Snyan#include <sys/types.h> 3366550Snyan#include <sys/bus_dma.h> 3466550Snyan 3566550Snyanint phyp_iommu_set_dma_tag(device_t dev, device_t child, bus_dma_tag_t tag); 3666550Snyanint phyp_iommu_map(device_t dev, bus_dma_segment_t *segs, int *nsegs, 3766550Snyan bus_addr_t min, bus_addr_t max, bus_size_t alignment, bus_addr_t boundary, 3866550Snyan void *cookie); 3966550Snyanint phyp_iommu_unmap(device_t dev, bus_dma_segment_t *segs, int nsegs, 4066550Snyan void *cookie); 4166550Snyan 4266550Snyan#endif 4392739Salfred 4466550Snyan