diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
| commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
| tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/mach-tegra/timer.h | |
| parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) | |
Diffstat (limited to 'arch/arm/mach-tegra/timer.h')
| -rw-r--r-- | arch/arm/mach-tegra/timer.h | 55 |
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 | ||
| 33 | void __init tegra2_init_timer(u32 *offset, int *irq); | ||
| 34 | #else | ||
| 35 | void __init tegra3_init_timer(u32 *offset, int *irq); | ||
| 36 | #endif | ||
| 37 | |||
| 38 | struct tegra_twd_context { | ||
| 39 | u32 twd_ctrl; | ||
| 40 | u32 twd_load; | ||
| 41 | u32 twd_cnt; | ||
| 42 | }; | ||
| 43 | |||
| 44 | #ifdef CONFIG_HAVE_ARM_TWD | ||
| 45 | int tegra_twd_get_state(struct tegra_twd_context *context); | ||
| 46 | void tegra_twd_suspend(struct tegra_twd_context *context); | ||
| 47 | void tegra_twd_resume(struct tegra_twd_context *context); | ||
| 48 | #else | ||
| 49 | static inline int tegra_twd_get_state(struct tegra_twd_context *context) | ||
| 50 | { return -ENODEV; } | ||
| 51 | static inline void tegra_twd_suspend(struct tegra_twd_context *context) {} | ||
| 52 | static inline void tegra_twd_resume(struct tegra_twd_context *context) {} | ||
| 53 | #endif | ||
| 54 | |||
| 55 | #endif /* _MACH_TEGRA_TIMER_H_ */ | ||
