Duy Truong | 790f06d | 2013-02-13 16:38:12 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2008-2009, 2011-2012 The Linux Foundation. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #ifndef _ARCH_ARM_MACH_MSM_TIMER_H_ |
| 15 | #define _ARCH_ARM_MACH_MSM_TIMER_H_ |
| 16 | |
| 17 | extern struct sys_timer msm_timer; |
| 18 | |
Jeff Ohlstein | ecefdc0 | 2012-01-13 12:37:44 -0800 | [diff] [blame] | 19 | uint32_t msm_timer_get_sclk_ticks(void); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 20 | int msm_timer_init_time_sync(void (*timeout)(void)); |
Jeff Ohlstein | e797f9d | 2012-04-02 12:10:28 -0700 | [diff] [blame] | 21 | #ifndef CONFIG_ARM_ARCH_TIMER |
Stepan Moskovchenko | aa6b27e | 2012-08-15 15:00:33 -0700 | [diff] [blame] | 22 | void __iomem *msm_timer_get_timer0_base(void); |
Jeff Ohlstein | e797f9d | 2012-04-02 12:10:28 -0700 | [diff] [blame] | 23 | int64_t msm_timer_enter_idle(void); |
| 24 | void msm_timer_exit_idle(int low_power); |
Jeff Ohlstein | b229638 | 2012-05-21 12:57:40 -0700 | [diff] [blame] | 25 | int64_t msm_timer_get_sclk_time(int64_t *period); |
Jeff Ohlstein | e797f9d | 2012-04-02 12:10:28 -0700 | [diff] [blame] | 26 | #else |
| 27 | static inline int64_t msm_timer_enter_idle(void) { return 0; } |
| 28 | static inline void msm_timer_exit_idle(int low_power) { return; } |
Jeff Ohlstein | b2a6724 | 2012-05-08 19:05:18 -0700 | [diff] [blame] | 29 | static inline int64_t msm_timer_get_sclk_time(int64_t *period) { return 0; } |
Stepan Moskovchenko | aa6b27e | 2012-08-15 15:00:33 -0700 | [diff] [blame] | 30 | static inline void __iomem *msm_timer_get_timer0_base(void) { return NULL; } |
Jeff Ohlstein | e797f9d | 2012-04-02 12:10:28 -0700 | [diff] [blame] | 31 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 32 | #endif |