aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/include/mach/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-davinci/include/mach/time.h')
-rw-r--r--arch/arm/mach-davinci/include/mach/time.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/include/mach/time.h b/arch/arm/mach-davinci/include/mach/time.h
new file mode 100644
index 00000000000..1428d77c989
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/time.h
@@ -0,0 +1,34 @@
1/*
2 * Local header file for DaVinci time code.
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#ifndef __ARCH_ARM_MACH_DAVINCI_TIME_H
12#define __ARCH_ARM_MACH_DAVINCI_TIME_H
13
14#define DAVINCI_TIMER0_BASE (IO_PHYS + 0x21400)
15#define DAVINCI_TIMER1_BASE (IO_PHYS + 0x21800)
16
17enum {
18 T0_BOT,
19 T0_TOP,
20 T1_BOT,
21 T1_TOP,
22 NUM_TIMERS
23};
24
25#define IS_TIMER1(id) (id & 0x2)
26#define IS_TIMER0(id) (!IS_TIMER1(id))
27#define IS_TIMER_TOP(id) ((id & 0x1))
28#define IS_TIMER_BOT(id) (!IS_TIMER_TOP(id))
29
30#define ID_TO_TIMER(id) (IS_TIMER1(id) != 0)
31
32extern struct davinci_timer_instance davinci_timer_instance[];
33
34#endif /* __ARCH_ARM_MACH_DAVINCI_TIME_H */