Go to the documentation of this file.
8 #include <linux/export.h>
35 #define INDIRECT_ADDR(addr) (((unsigned long)(addr) & 1UL<<63) != 0)
36 #define ADDR_TO_REGION(addr) (((unsigned long)addr >> 60) & 7)
37 #define IOPORT_MAP_BASE (8UL << 60)
39 #define INDIRECT_ADDR(addr) (((unsigned long)(addr) & 1UL<<31) != 0)
40 #define ADDR_TO_REGION(addr) (((unsigned long)addr >> 28) & 7)
41 #define IOPORT_MAP_BASE (8UL << 28)
65 #define ADDR2PORT(addr) ((unsigned long __force)(addr) & 0xffffff)
67 static unsigned int ioport_read8(
void __iomem *
addr)
72 static unsigned int ioport_read16(
void __iomem *
addr)
77 static unsigned int ioport_read32(
void __iomem *addr)
82 static void ioport_write8(
u8 datum,
void __iomem *addr)
87 static void ioport_write16(
u16 datum,
void __iomem *addr)
92 static void ioport_write32(
u32 datum,
void __iomem *addr)
97 static void ioport_read8r(
void __iomem *addr,
void *
dst,
unsigned long count)
102 static void ioport_read16r(
void __iomem *addr,
void *dst,
unsigned long count)
107 static void ioport_read32r(
void __iomem *addr,
void *dst,
unsigned long count)
112 static void ioport_write8r(
void __iomem *addr,
const void *
s,
unsigned long n)
117 static void ioport_write16r(
void __iomem *addr,
const void *s,
unsigned long n)
122 static void ioport_write32r(
void __iomem *addr,
const void *s,
unsigned long n)
127 static const struct iomap_ops ioport_ops = {
148 static unsigned int iomem_read8(
void __iomem *addr)
153 static unsigned int iomem_read16(
void __iomem *addr)
158 static unsigned int iomem_read16be(
void __iomem *addr)
163 static unsigned int iomem_read32(
void __iomem *addr)
168 static unsigned int iomem_read32be(
void __iomem *addr)
173 static void iomem_write8(
u8 datum,
void __iomem *addr)
178 static void iomem_write16(
u16 datum,
void __iomem *addr)
183 static void iomem_write16be(
u16 datum,
void __iomem *addr)
188 static void iomem_write32(
u32 datum,
void __iomem *addr)
193 static void iomem_write32be(
u32 datum,
void __iomem *addr)
198 static void iomem_read8r(
void __iomem *addr,
void *dst,
unsigned long count)
206 static void iomem_read16r(
void __iomem *addr,
void *dst,
unsigned long count)
214 static void iomem_read32r(
void __iomem *addr,
void *dst,
unsigned long count)
222 static void iomem_write8r(
void __iomem *addr,
const void *s,
unsigned long n)
230 static void iomem_write16r(
void __iomem *addr,
const void *s,
unsigned long n)
238 static void iomem_write32r(
void __iomem *addr,
const void *s,
unsigned long n)
246 static const struct iomap_ops iomem_ops = {
275 return *((
u8 *)addr);
289 return *((
u16 *)addr);
303 return *((
u32 *)addr);
311 *((
u8 *)addr) = datum;
329 *((
u16 *)addr) = datum;
347 *((
u32 *)addr) = datum;