blob: 2d05691ec9f367ec7c10844024fb885a534723f3 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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 ***
Ben Cheng654325d2012-03-07 21:13:49 -080010 *** 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 ***
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017 ****************************************************************************
18 ****************************************************************************/
19#ifndef __ARCH_OMAP_MTD_XIP_H__
20#define __ARCH_OMAP_MTD_XIP_H__
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080021#include <asm/hardware.h>
22#define OMAP_MPU_TIMER_BASE (0xfffec500)
Ben Cheng654325d2012-03-07 21:13:49 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024#define OMAP_MPU_TIMER_OFFSET 0x100
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080025typedef struct {
26 u32 cntl;
27 u32 load_tim;
Ben Cheng654325d2012-03-07 21:13:49 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029 u32 read_tim;
30} xip_omap_mpu_timer_regs_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080031#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))
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080032#define xip_irqpending() (omap_readl(OMAP_IH1_ITR) & ~omap_readl(OMAP_IH1_MIR))
Ben Cheng654325d2012-03-07 21:13:49 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080034#define xip_currtime() (~xip_omap_mpu_timer_read(0))
35#define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 6)
36#define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (1))
37#endif
Ben Cheng654325d2012-03-07 21:13:49 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */