Go to the documentation of this file.
4 #include <linux/string.h>
5 #include <linux/compiler.h>
10 #define IO_SPACE_LIMIT 0xFFFFFFFF
69 #define ioremap_nocache(off,size) ioremap(off,size)
74 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
75 #define page_to_bus page_to_phys
76 #define virt_to_bus virt_to_phys
78 extern unsigned char _inb(
unsigned long);
79 extern unsigned short _inw(
unsigned long);
80 extern unsigned long _inl(
unsigned long);
81 extern unsigned char _inb_p(
unsigned long);
82 extern unsigned short _inw_p(
unsigned long);
83 extern unsigned long _inl_p(
unsigned long);
84 extern void _outb(
unsigned char,
unsigned long);
85 extern void _outw(
unsigned short,
unsigned long);
86 extern void _outl(
unsigned long,
unsigned long);
87 extern void _outb_p(
unsigned char,
unsigned long);
88 extern void _outw_p(
unsigned short,
unsigned long);
89 extern void _outl_p(
unsigned long,
unsigned long);
90 extern void _insb(
unsigned int,
void *,
unsigned long);
91 extern void _insw(
unsigned int,
void *,
unsigned long);
92 extern void _insl(
unsigned int,
void *,
unsigned long);
93 extern void _outsb(
unsigned int,
const void *,
unsigned long);
94 extern void _outsw(
unsigned int,
const void *,
unsigned long);
95 extern void _outsl(
unsigned int,
const void *,
unsigned long);
97 static inline unsigned char _readb(
unsigned long addr)
99 return *(
volatile unsigned char __force *)addr;
102 static inline unsigned short _readw(
unsigned long addr)
104 return *(
volatile unsigned short __force *)addr;
107 static inline unsigned long _readl(
unsigned long addr)
109 return *(
volatile unsigned long __force *)addr;
112 static inline void _writeb(
unsigned char b,
unsigned long addr)
114 *(
volatile unsigned char __force *)addr = b;
117 static inline void _writew(
unsigned short w,
unsigned long addr)
119 *(
volatile unsigned short __force *)addr = w;
122 static inline void _writel(
unsigned long l,
unsigned long addr)
124 *(
volatile unsigned long __force *)addr = l;
137 #define outb_p _outb_p
138 #define outw_p _outw_p
139 #define outl_p _outl_p
148 #define readb(addr) _readb((unsigned long)(addr))
149 #define readw(addr) _readw((unsigned long)(addr))
150 #define readl(addr) _readl((unsigned long)(addr))
151 #define __raw_readb readb
152 #define __raw_readw readw
153 #define __raw_readl readl
154 #define readb_relaxed readb
155 #define readw_relaxed readw
156 #define readl_relaxed readl
158 #define writeb(val, addr) _writeb((val), (unsigned long)(addr))
159 #define writew(val, addr) _writew((val), (unsigned long)(addr))
160 #define writel(val, addr) _writel((val), (unsigned long)(addr))
161 #define __raw_writeb writeb
162 #define __raw_writew writew
163 #define __raw_writel writel
166 #define ioread16 readw
167 #define ioread32 readl
168 #define iowrite8 writeb
169 #define iowrite16 writew
170 #define iowrite32 writel
174 #define flush_write_buffers() do { } while (0)
198 #define xlate_dev_mem_ptr(p) __va(p)
203 #define xlate_dev_kmem_ptr(p) p