aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/timer.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/mach-tegra/timer.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'arch/arm/mach-tegra/timer.h')
-rw-r--r--arch/arm/mach-tegra/timer.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/timer.h b/arch/arm/mach-tegra/timer.h
new file mode 100644
index 00000000000..4a91792f5d9
--- /dev/null
+++ b/arch/arm/mach-tegra/timer.h
@@ -0,0 +1,55 @@
1/*
2 * arch/arm/mach-tegra/timer.h
3 *
4 * Copyright (C) 2010-2011 NVIDIA Corporation
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef _MACH_TEGRA_TIMER_H_
18#define _MACH_TEGRA_TIMER_H_
19
20#define RTC_SECONDS 0x08
21#define RTC_SHADOW_SECONDS 0x0c
22#define RTC_MILLISECONDS 0x10
23
24#define TIMER_PTV 0x0
25#define TIMER_PCR 0x4
26
27#define TIMERUS_CNTR_1US 0x10
28#define TIMERUS_USEC_CFG 0x14
29#define TIMERUS_CNTR_FREEZE 0x4c
30
31
32#ifdef CONFIG_ARCH_TEGRA_2x_SOC
33void __init tegra2_init_timer(u32 *offset, int *irq);
34#else
35void __init tegra3_init_timer(u32 *offset, int *irq);
36#endif
37
38struct tegra_twd_context {
39 u32 twd_ctrl;
40 u32 twd_load;
41 u32 twd_cnt;
42};
43
44#ifdef CONFIG_HAVE_ARM_TWD
45int tegra_twd_get_state(struct tegra_twd_context *context);
46void tegra_twd_suspend(struct tegra_twd_context *context);
47void tegra_twd_resume(struct tegra_twd_context *context);
48#else
49static inline int tegra_twd_get_state(struct tegra_twd_context *context)
50{ return -ENODEV; }
51static inline void tegra_twd_suspend(struct tegra_twd_context *context) {}
52static inline void tegra_twd_resume(struct tegra_twd_context *context) {}
53#endif
54
55#endif /* _MACH_TEGRA_TIMER_H_ */