Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
iomap.c File Reference
#include <linux/pci.h>
#include <linux/io.h>
#include <linux/export.h>

Go to the source code of this file.

Macros

#define PIO_OFFSET   0x10000UL
 
#define PIO_MASK   0x0ffffUL
 
#define PIO_RESERVED   0x40000UL
 
#define IO_COND(addr, is_pio, is_mmio)
 
#define pio_read16be(port)   swab16(inw(port))
 
#define pio_read32be(port)   swab32(inl(port))
 
#define mmio_read16be(addr)   be16_to_cpu(__raw_readw(addr))
 
#define mmio_read32be(addr)   be32_to_cpu(__raw_readl(addr))
 
#define pio_write16be(val, port)   outw(swab16(val),port)
 
#define pio_write32be(val, port)   outl(swab32(val),port)
 
#define mmio_write16be(val, port)   __raw_writew(be16_to_cpu(val),port)
 
#define mmio_write32be(val, port)   __raw_writel(be32_to_cpu(val),port)
 

Functions

unsigned int ioread8 (void __iomem *addr)
 
unsigned int ioread16 (void __iomem *addr)
 
unsigned int ioread16be (void __iomem *addr)
 
unsigned int ioread32 (void __iomem *addr)
 
unsigned int ioread32be (void __iomem *addr)
 
 EXPORT_SYMBOL (ioread8)
 
 EXPORT_SYMBOL (ioread16)
 
 EXPORT_SYMBOL (ioread16be)
 
 EXPORT_SYMBOL (ioread32)
 
 EXPORT_SYMBOL (ioread32be)
 
void iowrite8 (u8 val, void __iomem *addr)
 
void iowrite16 (u16 val, void __iomem *addr)
 
void iowrite16be (u16 val, void __iomem *addr)
 
void iowrite32 (u32 val, void __iomem *addr)
 
void iowrite32be (u32 val, void __iomem *addr)
 
 EXPORT_SYMBOL (iowrite8)
 
 EXPORT_SYMBOL (iowrite16)
 
 EXPORT_SYMBOL (iowrite16be)
 
 EXPORT_SYMBOL (iowrite32)
 
 EXPORT_SYMBOL (iowrite32be)
 
void ioread8_rep (void __iomem *addr, void *dst, unsigned long count)
 
void ioread16_rep (void __iomem *addr, void *dst, unsigned long count)
 
void ioread32_rep (void __iomem *addr, void *dst, unsigned long count)
 
 EXPORT_SYMBOL (ioread8_rep)
 
 EXPORT_SYMBOL (ioread16_rep)
 
 EXPORT_SYMBOL (ioread32_rep)
 
void iowrite8_rep (void __iomem *addr, const void *src, unsigned long count)
 
void iowrite16_rep (void __iomem *addr, const void *src, unsigned long count)
 
void iowrite32_rep (void __iomem *addr, const void *src, unsigned long count)
 
 EXPORT_SYMBOL (iowrite8_rep)
 
 EXPORT_SYMBOL (iowrite16_rep)
 
 EXPORT_SYMBOL (iowrite32_rep)
 

Macro Definition Documentation

#define IO_COND (   addr,
  is_pio,
  is_mmio 
)
Value:
do { \
unsigned long port = (unsigned long __force)addr; \
if (port >= PIO_RESERVED) { \
is_mmio; \
} else if (port > PIO_OFFSET) { \
is_pio; \
} else \
bad_io_access(port, #is_pio ); \
} while (0)

Definition at line 50 of file iomap.c.

#define mmio_read16be (   addr)    be16_to_cpu(__raw_readw(addr))

Definition at line 67 of file iomap.c.

#define mmio_read32be (   addr)    be32_to_cpu(__raw_readl(addr))

Definition at line 68 of file iomap.c.

#define mmio_write16be (   val,
  port 
)    __raw_writew(be16_to_cpu(val),port)

Definition at line 108 of file iomap.c.

#define mmio_write32be (   val,
  port 
)    __raw_writel(be32_to_cpu(val),port)

Definition at line 109 of file iomap.c.

#define PIO_MASK   0x0ffffUL

Definition at line 34 of file iomap.c.

#define PIO_OFFSET   0x10000UL

Definition at line 33 of file iomap.c.

#define pio_read16be (   port)    swab16(inw(port))

Definition at line 62 of file iomap.c.

#define pio_read32be (   port)    swab32(inl(port))

Definition at line 63 of file iomap.c.

#define PIO_RESERVED   0x40000UL

Definition at line 35 of file iomap.c.

#define pio_write16be (   val,
  port 
)    outw(swab16(val),port)

Definition at line 103 of file iomap.c.

#define pio_write32be (   val,
  port 
)    outl(swab32(val),port)

Definition at line 104 of file iomap.c.

Function Documentation

EXPORT_SYMBOL ( ioread8  )
EXPORT_SYMBOL ( ioread16  )
EXPORT_SYMBOL ( ioread16be  )
EXPORT_SYMBOL ( ioread32  )
EXPORT_SYMBOL ( ioread32be  )
EXPORT_SYMBOL ( iowrite8  )
EXPORT_SYMBOL ( iowrite16  )
EXPORT_SYMBOL ( iowrite16be  )
EXPORT_SYMBOL ( iowrite32  )
EXPORT_SYMBOL ( iowrite32be  )
EXPORT_SYMBOL ( ioread8_rep  )
EXPORT_SYMBOL ( ioread16_rep  )
EXPORT_SYMBOL ( ioread32_rep  )
EXPORT_SYMBOL ( iowrite8_rep  )
EXPORT_SYMBOL ( iowrite16_rep  )
EXPORT_SYMBOL ( iowrite32_rep  )
unsigned int ioread16 ( void __iomem addr)

Definition at line 76 of file iomap.c.

void ioread16_rep ( void __iomem addr,
void dst,
unsigned long  count 
)

Definition at line 199 of file iomap.c.

unsigned int ioread16be ( void __iomem addr)

Definition at line 81 of file iomap.c.

unsigned int ioread32 ( void __iomem addr)

Definition at line 86 of file iomap.c.

void ioread32_rep ( void __iomem addr,
void dst,
unsigned long  count 
)

Definition at line 203 of file iomap.c.

unsigned int ioread32be ( void __iomem addr)

Definition at line 91 of file iomap.c.

unsigned int ioread8 ( void __iomem addr)

Definition at line 71 of file iomap.c.

void ioread8_rep ( void __iomem addr,
void dst,
unsigned long  count 
)

Definition at line 195 of file iomap.c.

void iowrite16 ( u16  val,
void __iomem addr 
)

Definition at line 116 of file iomap.c.

void iowrite16_rep ( void __iomem addr,
const void src,
unsigned long  count 
)

Definition at line 215 of file iomap.c.

void iowrite16be ( u16  val,
void __iomem addr 
)

Definition at line 120 of file iomap.c.

void iowrite32 ( u32  val,
void __iomem addr 
)

Definition at line 124 of file iomap.c.

void iowrite32_rep ( void __iomem addr,
const void src,
unsigned long  count 
)

Definition at line 219 of file iomap.c.

void iowrite32be ( u32  val,
void __iomem addr 
)

Definition at line 128 of file iomap.c.

void iowrite8 ( u8  val,
void __iomem addr 
)

Definition at line 112 of file iomap.c.

void iowrite8_rep ( void __iomem addr,
const void src,
unsigned long  count 
)

Definition at line 211 of file iomap.c.