Go to the documentation of this file.
14 #ifndef __ARCH_OMAP_MTD_XIP_H__
15 #define __ARCH_OMAP_MTD_XIP_H__
17 #include <mach/hardware.h>
18 #define OMAP_MPU_TIMER_BASE (0xfffec500)
19 #define OMAP_MPU_TIMER_OFFSET 0x100
27 #define xip_omap_mpu_timer_base(n) \
28 ((volatile xip_omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \
29 (n)*OMAP_MPU_TIMER_OFFSET))
31 static inline unsigned long xip_omap_mpu_timer_read(
int nr)
37 #define xip_irqpending() \
38 (omap_readl(OMAP_IH1_ITR) & ~omap_readl(OMAP_IH1_MIR))
39 #define xip_currtime() (~xip_omap_mpu_timer_read(0))
46 #ifdef CONFIG_MACH_OMAP_PERSEUS2
47 #define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 7)
49 #define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 6)
59 #define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (1))