1 /****************************************************************************
2 ****************************************************************************
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.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef __ARCH_OMAP_MTD_XIP_H__
13 #define __ARCH_OMAP_MTD_XIP_H__
15 #include <asm/hardware.h>
16 #define OMAP_MPU_TIMER_BASE (0xfffec500)
17 #define OMAP_MPU_TIMER_OFFSET 0x100
23 } xip_omap_mpu_timer_regs_t;
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))
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))