Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
io.h File Reference
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/irqflags.h>
#include <asm/addrspace.h>
#include <asm/bug.h>
#include <asm/byteorder.h>
#include <asm/cpu.h>
#include <asm/cpu-features.h>
#include <asm-generic/iomap.h>
#include <asm/page.h>
#include <asm/pgtable-bits.h>
#include <asm/processor.h>
#include <asm/string.h>
#include <ioremap.h>
#include <mangle-port.h>

Go to the source code of this file.

Macros

#define __raw_ioswabb(a, x)   (x)
 
#define __raw_ioswabw(a, x)   (x)
 
#define __raw_ioswabl(a, x)   (x)
 
#define __raw_ioswabq(a, x)   (x)
 
#define ____raw_ioswabq(a, x)   (x)
 
#define IO_SPACE_LIMIT   0xffff
 
#define __SLOW_DOWN_IO
 
#define SLOW_DOWN_IO
 
#define isa_page_to_bus   page_to_phys
 
#define virt_to_bus   virt_to_phys
 
#define bus_to_virt   phys_to_virt
 
#define page_to_phys(page)   ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
 
#define __IS_LOW512(addr)   (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL))
 
#define ioremap(offset, size)   __ioremap_mode((offset), (size), _CACHE_UNCACHED)
 
#define ioremap_nocache(offset, size)   __ioremap_mode((offset), (size), _CACHE_UNCACHED)
 
#define ioremap_cachable(offset, size)   __ioremap_mode((offset), (size), _page_cachable_default)
 
#define ioremap_cacheable_cow(offset, size)   __ioremap_mode((offset), (size), _CACHE_CACHABLE_COW)
 
#define ioremap_uncached_accelerated(offset, size)   __ioremap_mode((offset), (size), _CACHE_UNCACHED_ACCELERATED)
 
#define __IS_KSEG1(addr)   (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1)
 
#define war_octeon_io_reorder_wmb()   do { } while (0)
 
#define __BUILD_MEMORY_SINGLE(pfx, bwlq, type, irq)
 
#define __BUILD_IOPORT_SINGLE(pfx, bwlq, type, p, slow)
 
#define __BUILD_MEMORY_PFX(bus, bwlq, type)
 
#define BUILDIO_MEM(bwlq, type)
 
#define __BUILD_IOPORT_PFX(bus, bwlq, type)
 
#define BUILDIO_IOPORT(bwlq, type)
 
#define __BUILDIO(bwlq, type)
 
#define readb_relaxed   readb
 
#define readw_relaxed   readw
 
#define readl_relaxed   readl
 
#define readq_relaxed   readq
 
#define readb_be(addr)   __raw_readb((__force unsigned *)(addr))
 
#define readw_be(addr)   be16_to_cpu(__raw_readw((__force unsigned *)(addr)))
 
#define readl_be(addr)   be32_to_cpu(__raw_readl((__force unsigned *)(addr)))
 
#define readq_be(addr)   be64_to_cpu(__raw_readq((__force unsigned *)(addr)))
 
#define writeb_be(val, addr)   __raw_writeb((val), (__force unsigned *)(addr))
 
#define writew_be(val, addr)   __raw_writew(cpu_to_be16((val)), (__force unsigned *)(addr))
 
#define writel_be(val, addr)   __raw_writel(cpu_to_be32((val)), (__force unsigned *)(addr))
 
#define writeq_be(val, addr)   __raw_writeq(cpu_to_be64((val)), (__force unsigned *)(addr))
 
#define readq   readq
 
#define writeq   writeq
 
#define __BUILD_MEMORY_STRING(bwlq, type)
 
#define __BUILD_IOPORT_STRING(bwlq, type)
 
#define BUILDSTRING(bwlq, type)
 
#define mmiowb()   asm volatile ("sync" ::: "memory")
 
#define dma_cache_wback_inv(start, size)   do { (void) (start); (void) (size); } while (0)
 
#define dma_cache_wback(start, size)   do { (void) (start); (void) (size); } while (0)
 
#define dma_cache_inv(start, size)   do { (void) (start); (void) (size); } while (0)
 
#define __CSR_32_ADJUST   0
 
#define csr_out32(v, a)   (*(volatile u32 *)((unsigned long)(a) + __CSR_32_ADJUST) = (v))
 
#define csr_in32(a)   (*(volatile u32 *)((unsigned long)(a) + __CSR_32_ADJUST))
 
#define xlate_dev_mem_ptr(p)   __va(p)
 
#define xlate_dev_kmem_ptr(p)   p
 

Functions

void __iomem__ioremap (phys_t offset, phys_t size, unsigned long flags)
 
void __iounmap (const volatile void __iomem *addr)
 

Variables

const unsigned long mips_io_port_base
 

Macro Definition Documentation

#define ____raw_ioswabq (   a,
  x 
)    (x)

Definition at line 49 of file io.h.

#define __BUILD_IOPORT_PFX (   bus,
  bwlq,
  type 
)
Value:
__BUILD_IOPORT_SINGLE(bus, bwlq, type, _p, SLOW_DOWN_IO)

Definition at line 426 of file io.h.

#define __BUILD_IOPORT_SINGLE (   pfx,
  bwlq,
  type,
  p,
  slow 
)

Definition at line 376 of file io.h.

#define __BUILD_IOPORT_STRING (   bwlq,
  type 
)
Value:
\
static inline void outs##bwlq(unsigned long port, const void *addr, \
unsigned int count) \
{ \
const volatile type *__addr = addr; \
\
while (count--) { \
__mem_out##bwlq(*__addr, port); \
__addr++; \
} \
} \
\
static inline void ins##bwlq(unsigned long port, void *addr, \
unsigned int count) \
{ \
volatile type *__addr = addr; \
\
while (count--) { \
*__addr = __mem_in##bwlq(port); \
__addr++; \
} \
}

Definition at line 500 of file io.h.

#define __BUILD_MEMORY_PFX (   bus,
  bwlq,
  type 
)
Value:
\
__BUILD_MEMORY_SINGLE(bus, bwlq, type, 1)

Definition at line 411 of file io.h.

#define __BUILD_MEMORY_SINGLE (   pfx,
  bwlq,
  type,
  irq 
)

Definition at line 306 of file io.h.

#define __BUILD_MEMORY_STRING (   bwlq,
  type 
)
Value:
\
static inline void writes##bwlq(volatile void __iomem *mem, \
const void *addr, unsigned int count) \
{ \
const volatile type *__addr = addr; \
\
while (count--) { \
__mem_write##bwlq(*__addr, mem); \
__addr++; \
} \
} \
\
static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \
unsigned int count) \
{ \
volatile type *__addr = addr; \
\
while (count--) { \
*__addr = __mem_read##bwlq(mem); \
__addr++; \
} \
}

Definition at line 476 of file io.h.

#define __BUILDIO (   bwlq,
  type 
)
Value:
\
__BUILD_MEMORY_SINGLE(____raw_, bwlq, type, 0)

Definition at line 441 of file io.h.

#define __CSR_32_ADJUST   0

Definition at line 606 of file io.h.

#define __IS_KSEG1 (   addr)    (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1)
#define __IS_LOW512 (   addr)    (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL))
#define __raw_ioswabb (   a,
  x 
)    (x)

Definition at line 45 of file io.h.

#define __raw_ioswabl (   a,
  x 
)    (x)

Definition at line 47 of file io.h.

#define __raw_ioswabq (   a,
  x 
)    (x)

Definition at line 48 of file io.h.

#define __raw_ioswabw (   a,
  x 
)    (x)

Definition at line 46 of file io.h.

#define __SLOW_DOWN_IO
Value:
__asm__ __volatile__( \
"sb\t$0,0x80(%0)" \
: : "r" (mips_io_port_base));

Definition at line 92 of file io.h.

#define BUILDIO_IOPORT (   bwlq,
  type 
)
Value:
__BUILD_IOPORT_PFX(__mem_, bwlq, type)

Definition at line 430 of file io.h.

#define BUILDIO_MEM (   bwlq,
  type 
)
Value:
\
__BUILD_MEMORY_PFX(__raw_, bwlq, type) \
__BUILD_MEMORY_PFX(, bwlq, type) \
__BUILD_MEMORY_PFX(__mem_, bwlq, type) \

Definition at line 415 of file io.h.

#define BUILDSTRING (   bwlq,
  type 
)
Value:
\
__BUILD_MEMORY_STRING(bwlq, type) \
__BUILD_IOPORT_STRING(bwlq, type)

Definition at line 524 of file io.h.

#define bus_to_virt   phys_to_virt

Definition at line 163 of file io.h.

#define csr_in32 (   a)    (*(volatile u32 *)((unsigned long)(a) + __CSR_32_ADJUST))

Definition at line 610 of file io.h.

#define csr_out32 (   v,
  a 
)    (*(volatile u32 *)((unsigned long)(a) + __CSR_32_ADJUST) = (v))

Definition at line 609 of file io.h.

#define dma_cache_inv (   start,
  size 
)    do { (void) (start); (void) (size); } while (0)

Definition at line 593 of file io.h.

#define dma_cache_wback (   start,
  size 
)    do { (void) (start); (void) (size); } while (0)

Definition at line 591 of file io.h.

#define dma_cache_wback_inv (   start,
  size 
)    do { (void) (start); (void) (size); } while (0)

Definition at line 589 of file io.h.

#define IO_SPACE_LIMIT   0xffff

Definition at line 53 of file io.h.

#define ioremap (   offset,
  size 
)    __ioremap_mode((offset), (size), _CACHE_UNCACHED)

Definition at line 230 of file io.h.

#define ioremap_cachable (   offset,
  size 
)    __ioremap_mode((offset), (size), _page_cachable_default)

Definition at line 270 of file io.h.

#define ioremap_cacheable_cow (   offset,
  size 
)    __ioremap_mode((offset), (size), _CACHE_CACHABLE_COW)

Definition at line 279 of file io.h.

#define ioremap_nocache (   offset,
  size 
)    __ioremap_mode((offset), (size), _CACHE_UNCACHED)

Definition at line 252 of file io.h.

#define ioremap_uncached_accelerated (   offset,
  size 
)    __ioremap_mode((offset), (size), _CACHE_UNCACHED_ACCELERATED)

Definition at line 281 of file io.h.

#define isa_page_to_bus   page_to_phys

Definition at line 154 of file io.h.

#define mmiowb ( )    asm volatile ("sync" ::: "memory")

Definition at line 541 of file io.h.

#define page_to_phys (   page)    ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)

Definition at line 168 of file io.h.

#define readb_be (   addr)    __raw_readb((__force unsigned *)(addr))

Definition at line 452 of file io.h.

#define readb_relaxed   readb

Definition at line 447 of file io.h.

#define readl_be (   addr)    be32_to_cpu(__raw_readl((__force unsigned *)(addr)))

Definition at line 456 of file io.h.

#define readl_relaxed   readl

Definition at line 449 of file io.h.

#define readq   readq

Definition at line 473 of file io.h.

#define readq_be (   addr)    be64_to_cpu(__raw_readq((__force unsigned *)(addr)))

Definition at line 458 of file io.h.

#define readq_relaxed   readq

Definition at line 450 of file io.h.

#define readw_be (   addr)    be16_to_cpu(__raw_readw((__force unsigned *)(addr)))

Definition at line 454 of file io.h.

#define readw_relaxed   readw

Definition at line 448 of file io.h.

#define SLOW_DOWN_IO

Definition at line 104 of file io.h.

#define virt_to_bus   virt_to_phys

Definition at line 162 of file io.h.

#define war_octeon_io_reorder_wmb ( )    do { } while (0)

Definition at line 303 of file io.h.

#define writeb_be (   val,
  addr 
)    __raw_writeb((val), (__force unsigned *)(addr))

Definition at line 461 of file io.h.

#define writel_be (   val,
  addr 
)    __raw_writel(cpu_to_be32((val)), (__force unsigned *)(addr))

Definition at line 465 of file io.h.

#define writeq   writeq

Definition at line 474 of file io.h.

#define writeq_be (   val,
  addr 
)    __raw_writeq(cpu_to_be64((val)), (__force unsigned *)(addr))

Definition at line 467 of file io.h.

#define writew_be (   val,
  addr 
)    __raw_writew(cpu_to_be16((val)), (__force unsigned *)(addr))

Definition at line 463 of file io.h.

#define xlate_dev_kmem_ptr (   p)    p

Definition at line 621 of file io.h.

#define xlate_dev_mem_ptr (   p)    __va(p)

Definition at line 616 of file io.h.

Function Documentation

void __iomem* __ioremap ( phys_t  offset,
phys_t  size,
unsigned long  flags 
)

Definition at line 22 of file ioremap.c.

void __iounmap ( const volatile void __iomem addr)

Definition at line 53 of file ioremap.c.

Variable Documentation

const unsigned long mips_io_port_base

Definition at line 73 of file setup.c.