Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Variables
io.h File Reference
#include <asm/byteorder.h>
#include <asm/page.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <asm-generic/iomap.h>

Go to the source code of this file.

Macros

#define _IO_BASE   0
 
#define _ISA_MEM_BASE   0
 
#define PCI_DRAM_OFFSET   0
 
#define IO_SPACE_LIMIT   (0xFFFFFFFF)
 
#define mmiowb()
 
#define ioread8(addr)   __raw_readb((u8 *)(addr))
 
#define ioread16(addr)   __raw_readw((u16 *)(addr))
 
#define ioread32(addr)   __raw_readl((u32 *)(addr))
 
#define iowrite8(v, addr)   __raw_writeb((u8)(v), (u8 *)(addr))
 
#define iowrite16(v, addr)   __raw_writew((u16)(v), (u16 *)(addr))
 
#define iowrite32(v, addr)   __raw_writel((u32)(v), (u32 *)(addr))
 
#define ioread16be(addr)   __raw_readw((u16 *)(addr))
 
#define ioread32be(addr)   __raw_readl((u32 *)(addr))
 
#define iowrite16be(v, addr)   __raw_writew((u16)(v), (u16 *)(addr))
 
#define iowrite32be(v, addr)   __raw_writel((u32)(v), (u32 *)(addr))
 
#define inb(port)   readb((u8 *)((port)))
 
#define outb(val, port)   writeb((val), (u8 *)((unsigned long)(port)))
 
#define inw(port)   readw((u16 *)((port)))
 
#define outw(val, port)   writew((val), (u16 *)((unsigned long)(port)))
 
#define inl(port)   readl((u32 *)((port)))
 
#define outl(val, port)   writel((val), (u32 *)((unsigned long)(port)))
 
#define inb_p(port)   inb((port))
 
#define outb_p(val, port)   outb((val), (port))
 
#define inw_p(port)   inw((port))
 
#define outw_p(val, port)   outw((val), (port))
 
#define inl_p(port)   inl((port))
 
#define outl_p(val, port)   outl((val), (port))
 
#define memset_io(a, b, c)   memset((void *)(a), (b), (c))
 
#define memcpy_fromio(a, b, c)   memcpy((a), (void *)(b), (c))
 
#define memcpy_toio(a, b, c)   memcpy((void *)(a), (b), (c))
 
#define virt_to_bus   virt_to_phys
 
#define bus_to_virt(a)   phys_to_virt(a)
 
#define ioremap(physaddr, size)   ((void __iomem *)(unsigned long)(physaddr))
 
#define iounmap(addr)   ((void)0)
 
#define ioremap_nocache(physaddr, size)   ioremap(physaddr, size)
 
#define xlate_dev_mem_ptr(p)   __va(p)
 
#define xlate_dev_kmem_ptr(p)   p
 
#define out_be32(a, v)   __raw_writel((v), (void __iomem __force *)(a))
 
#define out_be16(a, v)   __raw_writew((v), (a))
 
#define in_be32(a)   __raw_readl((const void __iomem __force *)(a))
 
#define in_be16(a)   __raw_readw(a)
 
#define writel_be(v, a)   out_be32((__force unsigned *)a, v)
 
#define readl_be(a)   in_be32((__force unsigned *)a)
 
#define out_le32(a, v)   __raw_writel(__cpu_to_le32(v), (a))
 
#define out_le16(a, v)   __raw_writew(__cpu_to_le16(v), (a))
 
#define in_le32(a)   __le32_to_cpu(__raw_readl(a))
 
#define in_le16(a)   __le16_to_cpu(__raw_readw(a))
 
#define out_8(a, v)   __raw_writeb((v), (a))
 
#define in_8(a)   __raw_readb(a)
 
#define mmiowb()
 
#define ioport_map(port, nr)   ((void __iomem *)(port))
 
#define ioport_unmap(addr)
 
#define ioread8_rep(p, dst, count)   insb((unsigned long) (p), (dst), (count))
 
#define ioread16_rep(p, dst, count)   insw((unsigned long) (p), (dst), (count))
 
#define ioread32_rep(p, dst, count)   insl((unsigned long) (p), (dst), (count))
 
#define iowrite8_rep(p, src, count)   outsb((unsigned long) (p), (src), (count))
 
#define iowrite16_rep(p, src, count)   outsw((unsigned long) (p), (src), (count))
 
#define iowrite32_rep(p, src, count)   outsl((unsigned long) (p), (src), (count))
 

Variables

unsigned long isa_io_base
 
unsigned long pci_io_base
 
unsigned long pci_dram_offset
 
resource_size_t isa_mem_base
 

Macro Definition Documentation

#define _IO_BASE   0

Definition at line 21 of file io.h.

#define _ISA_MEM_BASE   0

Definition at line 22 of file io.h.

#define bus_to_virt (   a)    phys_to_virt(a)

Definition at line 199 of file io.h.

#define in_8 (   a)    __raw_readb(a)

Definition at line 248 of file io.h.

#define in_be16 (   a)    __raw_readw(a)

Definition at line 231 of file io.h.

#define in_be32 (   a)    __raw_readl((const void __iomem __force *)(a))

Definition at line 230 of file io.h.

#define in_le16 (   a)    __le16_to_cpu(__raw_readw(a))

Definition at line 244 of file io.h.

#define in_le32 (   a)    __le32_to_cpu(__raw_readl(a))

Definition at line 243 of file io.h.

#define inb (   port)    readb((u8 *)((port)))

Definition at line 126 of file io.h.

#define inb_p (   port)    inb((port))

Definition at line 133 of file io.h.

#define inl (   port)    readl((u32 *)((port)))

Definition at line 130 of file io.h.

#define inl_p (   port)    inl((port))

Definition at line 137 of file io.h.

#define inw (   port)    readw((u16 *)((port)))

Definition at line 128 of file io.h.

#define inw_p (   port)    inw((port))

Definition at line 135 of file io.h.

#define IO_SPACE_LIMIT   (0xFFFFFFFF)

Definition at line 36 of file io.h.

#define ioport_map (   port,
  nr 
)    ((void __iomem *)(port))

Definition at line 252 of file io.h.

#define ioport_unmap (   addr)

Definition at line 253 of file io.h.

#define ioread16 (   addr)    __raw_readw((u16 *)(addr))

Definition at line 109 of file io.h.

#define ioread16_rep (   p,
  dst,
  count 
)    insw((unsigned long) (p), (dst), (count))

Definition at line 333 of file io.h.

#define ioread16be (   addr)    __raw_readw((u16 *)(addr))

Definition at line 115 of file io.h.

#define ioread32 (   addr)    __raw_readl((u32 *)(addr))

Definition at line 110 of file io.h.

#define ioread32_rep (   p,
  dst,
  count 
)    insl((unsigned long) (p), (dst), (count))

Definition at line 335 of file io.h.

#define ioread32be (   addr)    __raw_readl((u32 *)(addr))

Definition at line 116 of file io.h.

#define ioread8 (   addr)    __raw_readb((u8 *)(addr))

Definition at line 108 of file io.h.

#define ioread8_rep (   p,
  dst,
  count 
)    insb((unsigned long) (p), (dst), (count))

Definition at line 331 of file io.h.

#define ioremap (   physaddr,
  size 
)    ((void __iomem *)(unsigned long)(physaddr))

Definition at line 207 of file io.h.

#define ioremap_nocache (   physaddr,
  size 
)    ioremap(physaddr, size)

Definition at line 209 of file io.h.

#define iounmap (   addr)    ((void)0)

Definition at line 208 of file io.h.

#define iowrite16 (   v,
  addr 
)    __raw_writew((u16)(v), (u16 *)(addr))

Definition at line 112 of file io.h.

#define iowrite16_rep (   p,
  src,
  count 
)    outsw((unsigned long) (p), (src), (count))

Definition at line 340 of file io.h.

#define iowrite16be (   v,
  addr 
)    __raw_writew((u16)(v), (u16 *)(addr))

Definition at line 117 of file io.h.

#define iowrite32 (   v,
  addr 
)    __raw_writel((u32)(v), (u32 *)(addr))

Definition at line 113 of file io.h.

#define iowrite32_rep (   p,
  src,
  count 
)    outsl((unsigned long) (p), (src), (count))

Definition at line 342 of file io.h.

#define iowrite32be (   v,
  addr 
)    __raw_writel((u32)(v), (u32 *)(addr))

Definition at line 118 of file io.h.

#define iowrite8 (   v,
  addr 
)    __raw_writeb((u8)(v), (u8 *)(addr))

Definition at line 111 of file io.h.

#define iowrite8_rep (   p,
  src,
  count 
)    outsb((unsigned long) (p), (src), (count))

Definition at line 338 of file io.h.

#define memcpy_fromio (   a,
  b,
  c 
)    memcpy((a), (void *)(b), (c))

Definition at line 141 of file io.h.

#define memcpy_toio (   a,
  b,
  c 
)    memcpy((void *)(a), (b), (c))

Definition at line 142 of file io.h.

#define memset_io (   a,
  b,
  c 
)    memset((void *)(a), (b), (c))

Definition at line 140 of file io.h.

#define mmiowb ( )

Definition at line 250 of file io.h.

#define mmiowb ( )

Definition at line 250 of file io.h.

#define out_8 (   a,
  v 
)    __raw_writeb((v), (a))

Definition at line 247 of file io.h.

#define out_be16 (   a,
  v 
)    __raw_writew((v), (a))

Definition at line 228 of file io.h.

#define out_be32 (   a,
  v 
)    __raw_writel((v), (void __iomem __force *)(a))

Definition at line 227 of file io.h.

#define out_le16 (   a,
  v 
)    __raw_writew(__cpu_to_le16(v), (a))

Definition at line 241 of file io.h.

#define out_le32 (   a,
  v 
)    __raw_writel(__cpu_to_le32(v), (a))

Definition at line 240 of file io.h.

#define outb (   val,
  port 
)    writeb((val), (u8 *)((unsigned long)(port)))

Definition at line 127 of file io.h.

#define outb_p (   val,
  port 
)    outb((val), (port))

Definition at line 134 of file io.h.

#define outl (   val,
  port 
)    writel((val), (u32 *)((unsigned long)(port)))

Definition at line 131 of file io.h.

#define outl_p (   val,
  port 
)    outl((val), (port))

Definition at line 138 of file io.h.

#define outw (   val,
  port 
)    writew((val), (u16 *)((unsigned long)(port)))

Definition at line 129 of file io.h.

#define outw_p (   val,
  port 
)    outw((val), (port))

Definition at line 136 of file io.h.

#define PCI_DRAM_OFFSET   0

Definition at line 23 of file io.h.

#define readl_be (   a)    in_be32((__force unsigned *)a)

Definition at line 234 of file io.h.

#define virt_to_bus   virt_to_phys

Definition at line 180 of file io.h.

#define writel_be (   v,
  a 
)    out_be32((__force unsigned *)a, v)

Definition at line 233 of file io.h.

#define xlate_dev_kmem_ptr (   p)    p

Definition at line 222 of file io.h.

#define xlate_dev_mem_ptr (   p)    __va(p)

Definition at line 217 of file io.h.

Variable Documentation

unsigned long isa_io_base

Definition at line 51 of file pci-common.c.

resource_size_t isa_mem_base

Definition at line 47 of file pci-common.c.

unsigned long pci_dram_offset

Definition at line 52 of file pci-common.c.

unsigned long pci_io_base

Definition at line 42 of file pci_64.c.