1 /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 3 * MTD primitives for XIP support. Architectur 4 * 5 * Do not include this file directly. It's inc 6 * 7 * Author: Vladimir Barinov <vbarinov@embedded 8 * 9 * (c) 2005 MontaVista Software, Inc. 10 */ 11 12 #ifndef __ARCH_OMAP_MTD_XIP_H__ 13 #define __ARCH_OMAP_MTD_XIP_H__ 14 15 #include "hardware.h" 16 #include <linux/soc/ti/omap1-io.h> 17 #define OMAP_MPU_TIMER_BASE (0xfffec500) 18 #define OMAP_MPU_TIMER_OFFSET 0x100 19 20 typedef struct { 21 u32 cntl; /* CNT 22 u32 load_tim; /* LOA 23 u32 read_tim; /* REA 24 } xip_omap_mpu_timer_regs_t; 25 26 #define xip_omap_mpu_timer_base(n) 27 ((volatile xip_omap_mpu_timer_regs_t*)OMAP1_IO 28 (n)*OMAP_MPU_TIMER_OFFSET)) 29 30 static inline unsigned long xip_omap_mpu_timer 31 { 32 volatile xip_omap_mpu_timer_regs_t* ti 33 return timer->read_tim; 34 } 35 36 #define xip_irqpending() \ 37 (omap_readl(OMAP_IH1_ITR) & ~omap_read 38 #define xip_currtime() (~xip_omap_mpu 39 40 /* 41 * It's permitted to do approximation for xip_ 42 * (see linux/mtd/xip.h) 43 */ 44 45 #define xip_elapsed_since(x) (signed)((~xip 46 47 /* 48 * xip_cpu_idle() is used when waiting for a d 49 * the system timer tick period. This should 50 * to save power and to be woken up only when 51 * As above, this should not rely upon standar 52 */ 53 54 #define xip_cpu_idle() asm volatile ("mcr p15 55 56 #endif /* __ARCH_OMAP_MTD_XIP_H__ */ 57
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.