OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / prebuilt / ndk / android-ndk-r4 / platforms / android-4 / arch-arm / usr / include / asm / arch / mtd-xip.h
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  ****************************************************************************
11  ****************************************************************************/
12 #ifndef __ARCH_OMAP_MTD_XIP_H__
13 #define __ARCH_OMAP_MTD_XIP_H__
14
15 #include <asm/hardware.h>
16 #define OMAP_MPU_TIMER_BASE (0xfffec500)
17 #define OMAP_MPU_TIMER_OFFSET 0x100
18
19 typedef struct {
20  u32 cntl;
21  u32 load_tim;
22  u32 read_tim;
23 } xip_omap_mpu_timer_regs_t;
24
25 #define xip_omap_mpu_timer_base(n)  ((volatile xip_omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE +   (n)*OMAP_MPU_TIMER_OFFSET))
26
27 #define xip_irqpending()   (omap_readl(OMAP_IH1_ITR) & ~omap_readl(OMAP_IH1_MIR))
28 #define xip_currtime() (~xip_omap_mpu_timer_read(0))
29 #define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 6)
30 #define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (1))
31 #endif