Home | History | Annotate | Download | only in arch
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef __ASM_ARM_ARCH_IO_H
     20 #define __ASM_ARM_ARCH_IO_H
     21 #include <asm/hardware.h>
     22 #define IO_SPACE_LIMIT 0xffffffff
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
     25 #define __mem_pci(a) (a)
     26 #define PCIO_BASE 0
     27 #ifndef __ASSEMBLER__
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define omap_readb(a) (*(volatile unsigned char *)IO_ADDRESS(a))
     30 #define omap_readw(a) (*(volatile unsigned short *)IO_ADDRESS(a))
     31 #define omap_readl(a) (*(volatile unsigned int *)IO_ADDRESS(a))
     32 #define omap_writeb(v,a) (*(volatile unsigned char *)IO_ADDRESS(a) = (v))
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 #define omap_writew(v,a) (*(volatile unsigned short *)IO_ADDRESS(a) = (v))
     35 #define omap_writel(v,a) (*(volatile unsigned int *)IO_ADDRESS(a) = (v))
     36 typedef struct { volatile u16 offset[256]; } __regbase16;
     37 #define __REGV16(vaddr) ((__regbase16 *)((vaddr)&~0xff))   ->offset[((vaddr)&0xff)>>1]
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define __REG16(paddr) __REGV16(io_p2v(paddr))
     40 typedef struct { volatile u8 offset[4096]; } __regbase8;
     41 #define __REGV8(vaddr) ((__regbase8 *)((vaddr)&~4095))   ->offset[((vaddr)&4095)>>0]
     42 #define __REG8(paddr) __REGV8(io_p2v(paddr))
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 typedef struct { volatile u32 offset[4096]; } __regbase32;
     45 #define __REGV32(vaddr) ((__regbase32 *)((vaddr)&~4095))   ->offset[((vaddr)&4095)>>2]
     46 #define __REG32(paddr) __REGV32(io_p2v(paddr))
     47 #else
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 #define __REG8(paddr) io_p2v(paddr)
     50 #define __REG16(paddr) io_p2v(paddr)
     51 #define __REG32(paddr) io_p2v(paddr)
     52 #endif
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54 #endif
     55