xref: /dflybsd-src/sys/dev/drm/include/linux/swiotlb.h (revision de388f91274803b2f050f688d3cecaf6219e4aa1)
11dedbd3bSFrançois Tigeot /*
2*de388f91SFrançois Tigeot  * Copyright (c) 2019-2020 François Tigeot <ftigeot@wolfpond.org>
31dedbd3bSFrançois Tigeot  * All rights reserved.
41dedbd3bSFrançois Tigeot  *
51dedbd3bSFrançois Tigeot  * Redistribution and use in source and binary forms, with or without
61dedbd3bSFrançois Tigeot  * modification, are permitted provided that the following conditions
71dedbd3bSFrançois Tigeot  * are met:
81dedbd3bSFrançois Tigeot  * 1. Redistributions of source code must retain the above copyright
91dedbd3bSFrançois Tigeot  *    notice unmodified, this list of conditions, and the following
101dedbd3bSFrançois Tigeot  *    disclaimer.
111dedbd3bSFrançois Tigeot  * 2. Redistributions in binary form must reproduce the above copyright
121dedbd3bSFrançois Tigeot  *    notice, this list of conditions and the following disclaimer in the
131dedbd3bSFrançois Tigeot  *    documentation and/or other materials provided with the distribution.
141dedbd3bSFrançois Tigeot  *
151dedbd3bSFrançois Tigeot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
161dedbd3bSFrançois Tigeot  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
171dedbd3bSFrançois Tigeot  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
181dedbd3bSFrançois Tigeot  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
191dedbd3bSFrançois Tigeot  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
201dedbd3bSFrançois Tigeot  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
211dedbd3bSFrançois Tigeot  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
221dedbd3bSFrançois Tigeot  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
231dedbd3bSFrançois Tigeot  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
241dedbd3bSFrançois Tigeot  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
251dedbd3bSFrançois Tigeot  */
261dedbd3bSFrançois Tigeot 
271dedbd3bSFrançois Tigeot #ifndef _LINUX_SWIOTLB_H_
281dedbd3bSFrançois Tigeot #define _LINUX_SWIOTLB_H_
291dedbd3bSFrançois Tigeot 
301dedbd3bSFrançois Tigeot #include <linux/dma-direction.h>
311dedbd3bSFrançois Tigeot #include <linux/init.h>
321dedbd3bSFrançois Tigeot #include <linux/types.h>
331dedbd3bSFrançois Tigeot 
34*de388f91SFrançois Tigeot static inline unsigned int
swiotlb_max_segment(void)35*de388f91SFrançois Tigeot swiotlb_max_segment(void)
36*de388f91SFrançois Tigeot {
37*de388f91SFrançois Tigeot 	return 0;
38*de388f91SFrançois Tigeot }
39*de388f91SFrançois Tigeot 
401dedbd3bSFrançois Tigeot #endif	/* _LINUX_SWIOTLB_H_ */
41