Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
io.h File Reference
#include <asm/page.h>
#include <arch/io.h>
#include <linux/kernel.h>

Go to the source code of this file.

Data Structures

struct  cris_io_operations
 

Macros

#define cris_iops   ((struct cris_io_operations*)NULL)
 
#define virt_to_bus   virt_to_phys
 
#define bus_to_virt   phys_to_virt
 
#define PCI_SPACE(x)   0
 
#define readb_relaxed(addr)   readb(addr)
 
#define readw_relaxed(addr)   readw(addr)
 
#define readl_relaxed(addr)   readl(addr)
 
#define __raw_readb   readb
 
#define __raw_readw   readw
 
#define __raw_readl   readl
 
#define __raw_writeb   writeb
 
#define __raw_writew   writew
 
#define __raw_writel   writel
 
#define mmiowb()
 
#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 IO_SPACE_LIMIT   0xffff
 
#define inb(port)   (cris_iops ? cris_iops->read_io(port,NULL,1,1) : 0)
 
#define inw(port)   (cris_iops ? cris_iops->read_io(port,NULL,2,1) : 0)
 
#define inl(port)   (cris_iops ? cris_iops->read_io(port,NULL,4,1) : 0)
 
#define insb(port, addr, count)   (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0)
 
#define insw(port, addr, count)   (cris_iops ? cris_iops->read_io(port,addr,2,count) : 0)
 
#define insl(port, addr, count)   (cris_iops ? cris_iops->read_io(port,addr,4,count) : 0)
 
#define outb(data, port)   if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,1,1)
 
#define outw(data, port)   if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,2,1)
 
#define outl(data, port)   if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,4,1)
 
#define outsb(port, addr, count)   if(cris_iops) cris_iops->write_io(port,(void*)addr,1,count)
 
#define outsw(port, addr, count)   if(cris_iops) cris_iops->write_io(port,(void*)addr,2,count)
 
#define outsl(port, addr, count)   if(cris_iops) cris_iops->write_io(port,(void*)addr,3,count)
 
#define xlate_dev_mem_ptr(p)   __va(p)
 
#define xlate_dev_kmem_ptr(p)   p
 

Functions

void __iomem__ioremap (unsigned long offset, unsigned long size, unsigned long flags)
 
void __iomem__ioremap_prot (unsigned long phys_addr, unsigned long size, pgprot_t prot)
 
void iounmap (volatile void *__iomem addr)
 
void __iomemioremap_nocache (unsigned long offset, unsigned long size)
 

Macro Definition Documentation

#define __raw_readb   readb

Definition at line 89 of file io.h.

#define __raw_readl   readl

Definition at line 91 of file io.h.

#define __raw_readw   readw

Definition at line 90 of file io.h.

#define __raw_writeb   writeb

Definition at line 114 of file io.h.

#define __raw_writel   writel

Definition at line 116 of file io.h.

#define __raw_writew   writew

Definition at line 115 of file io.h.

#define bus_to_virt   phys_to_virt

Definition at line 52 of file io.h.

#define cris_iops   ((struct cris_io_operations*)NULL)

Definition at line 19 of file io.h.

#define inb (   port)    (cris_iops ? cris_iops->read_io(port,NULL,1,1) : 0)

Definition at line 130 of file io.h.

#define inl (   port)    (cris_iops ? cris_iops->read_io(port,NULL,4,1) : 0)

Definition at line 132 of file io.h.

#define insb (   port,
  addr,
  count 
)    (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0)

Definition at line 133 of file io.h.

#define insl (   port,
  addr,
  count 
)    (cris_iops ? cris_iops->read_io(port,addr,4,count) : 0)

Definition at line 135 of file io.h.

#define insw (   port,
  addr,
  count 
)    (cris_iops ? cris_iops->read_io(port,addr,2,count) : 0)

Definition at line 134 of file io.h.

#define inw (   port)    (cris_iops ? cris_iops->read_io(port,NULL,2,1) : 0)

Definition at line 131 of file io.h.

#define IO_SPACE_LIMIT   0xffff

Definition at line 129 of file io.h.

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

Definition at line 121 of file io.h.

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

Definition at line 122 of file io.h.

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

Definition at line 120 of file io.h.

#define mmiowb ( )

Definition at line 118 of file io.h.

#define outb (   data,
  port 
)    if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,1,1)

Definition at line 136 of file io.h.

#define outl (   data,
  port 
)    if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,4,1)

Definition at line 138 of file io.h.

#define outsb (   port,
  addr,
  count 
)    if(cris_iops) cris_iops->write_io(port,(void*)addr,1,count)

Definition at line 139 of file io.h.

#define outsl (   port,
  addr,
  count 
)    if(cris_iops) cris_iops->write_io(port,(void*)addr,3,count)

Definition at line 141 of file io.h.

#define outsw (   port,
  addr,
  count 
)    if(cris_iops) cris_iops->write_io(port,(void*)addr,2,count)

Definition at line 140 of file io.h.

#define outw (   data,
  port 
)    if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,2,1)

Definition at line 137 of file io.h.

#define PCI_SPACE (   x)    0

Definition at line 63 of file io.h.

#define readb_relaxed (   addr)    readb(addr)

Definition at line 86 of file io.h.

#define readl_relaxed (   addr)    readl(addr)

Definition at line 88 of file io.h.

#define readw_relaxed (   addr)    readw(addr)

Definition at line 87 of file io.h.

#define virt_to_bus   virt_to_phys

Definition at line 51 of file io.h.

#define xlate_dev_kmem_ptr (   p)    p

Definition at line 152 of file io.h.

#define xlate_dev_mem_ptr (   p)    __va(p)

Definition at line 147 of file io.h.

Function Documentation

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

Definition at line 22 of file ioremap.c.

void __iomem* __ioremap_prot ( unsigned long  phys_addr,
unsigned long  size,
pgprot_t  prot 
)

Definition at line 30 of file ioremap.c.

void __iomem* ioremap_nocache ( unsigned long  phys_addr,
unsigned long  size 
)

ioremap_nocache - map bus memory into CPU space : bus address of the memory : size of the resource to map

Must be freed with iounmap.

Definition at line 79 of file ioremap.c.

void iounmap ( volatile void *__iomem  addr)