This source file includes following definitions.
- ioremap
- ioremap_nocache
- iounmap
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 #ifndef _ASM_NIOS2_IO_H
  12 #define _ASM_NIOS2_IO_H
  13 
  14 #include <linux/types.h>
  15 #include <asm/pgtable-bits.h>
  16 
  17 
  18 #define IO_SPACE_LIMIT 0
  19 
  20 #define readb_relaxed(addr)     readb(addr)
  21 #define readw_relaxed(addr)     readw(addr)
  22 #define readl_relaxed(addr)     readl(addr)
  23 
  24 #define writeb_relaxed(x, addr) writeb(x, addr)
  25 #define writew_relaxed(x, addr) writew(x, addr)
  26 #define writel_relaxed(x, addr) writel(x, addr)
  27 
  28 extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size,
  29                         unsigned long cacheflag);
  30 extern void __iounmap(void __iomem *addr);
  31 
  32 static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size)
  33 {
  34         return __ioremap(physaddr, size, 0);
  35 }
  36 
  37 static inline void __iomem *ioremap_nocache(unsigned long physaddr,
  38                                                 unsigned long size)
  39 {
  40         return __ioremap(physaddr, size, 0);
  41 }
  42 
  43 static inline void iounmap(void __iomem *addr)
  44 {
  45         __iounmap(addr);
  46 }
  47 
  48 #define ioremap_nocache ioremap_nocache
  49 #define ioremap_wc ioremap_nocache
  50 #define ioremap_wt ioremap_nocache
  51 
  52 
  53 #define page_to_phys(page)      virt_to_phys(page_to_virt(page))
  54 
  55 
  56 #define phys_to_virt(vaddr)     \
  57         ((void *)((unsigned long)(vaddr) | CONFIG_NIOS2_KERNEL_REGION_BASE))
  58 
  59 #define virt_to_phys(vaddr)     \
  60         ((unsigned long)((unsigned long)(vaddr) & ~0xE0000000))
  61 
  62 #include <asm-generic/io.h>
  63 
  64 #endif