xref: /dflybsd-src/sys/dev/drm/include/linux/io.h (revision cdc70ef7c987bc2e1b321123ca6a5d0d742d5fd4)
1dd453158SFrançois Tigeot /*
2*cdc70ef7SFrançois Tigeot  * Copyright (c) 2014-2016 François Tigeot
3dd453158SFrançois Tigeot  * All rights reserved.
4dd453158SFrançois Tigeot  *
5dd453158SFrançois Tigeot  * Redistribution and use in source and binary forms, with or without
6dd453158SFrançois Tigeot  * modification, are permitted provided that the following conditions
7dd453158SFrançois Tigeot  * are met:
8dd453158SFrançois Tigeot  * 1. Redistributions of source code must retain the above copyright
9dd453158SFrançois Tigeot  *    notice unmodified, this list of conditions, and the following
10dd453158SFrançois Tigeot  *    disclaimer.
11dd453158SFrançois Tigeot  * 2. Redistributions in binary form must reproduce the above copyright
12dd453158SFrançois Tigeot  *    notice, this list of conditions and the following disclaimer in the
13dd453158SFrançois Tigeot  *    documentation and/or other materials provided with the distribution.
14dd453158SFrançois Tigeot  *
15dd453158SFrançois Tigeot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16dd453158SFrançois Tigeot  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17dd453158SFrançois Tigeot  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18dd453158SFrançois Tigeot  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19dd453158SFrançois Tigeot  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20dd453158SFrançois Tigeot  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21dd453158SFrançois Tigeot  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22dd453158SFrançois Tigeot  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23dd453158SFrançois Tigeot  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24dd453158SFrançois Tigeot  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25dd453158SFrançois Tigeot  */
26dd453158SFrançois Tigeot 
27dd453158SFrançois Tigeot #ifndef _LINUX_IO_H_
28dd453158SFrançois Tigeot #define _LINUX_IO_H_
29dd453158SFrançois Tigeot 
3047ad44e8SFrançois Tigeot #include <linux/kernel.h>
31742b09c6Szrj #include <linux/bug.h>
328b1a6a38SFrançois Tigeot #include <asm/io.h>
338b1a6a38SFrançois Tigeot #include <asm/page.h>
34dd453158SFrançois Tigeot 
3547ad44e8SFrançois Tigeot static inline int
arch_phys_wc_add(unsigned long base,unsigned long size)3647ad44e8SFrançois Tigeot arch_phys_wc_add(unsigned long base, unsigned long size)
3747ad44e8SFrançois Tigeot {
3847ad44e8SFrançois Tigeot 	/* The DragonFly kernel is PAT-enabled, do nothing */
3947ad44e8SFrançois Tigeot 	return 0;
4047ad44e8SFrançois Tigeot }
4147ad44e8SFrançois Tigeot 
4247ad44e8SFrançois Tigeot static inline void
arch_phys_wc_del(int handle)4347ad44e8SFrançois Tigeot arch_phys_wc_del(int handle)
4447ad44e8SFrançois Tigeot {
4547ad44e8SFrançois Tigeot 	BUG_ON(handle != 0);
4647ad44e8SFrançois Tigeot }
4747ad44e8SFrançois Tigeot 
48dd453158SFrançois Tigeot #endif	/* _LINUX_IO_H_ */
49