blob: 7da9e6a39e8885c23fb9c072b544b2a4387d6bee [file] [log] [blame]
Jeff Ohlsteinecefdc02012-01-13 12:37:44 -08001/* Copyright (c) 2008-2009, 2011-2012 Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
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
17extern struct sys_timer msm_timer;
18
Jeff Ohlstein973871d2011-09-28 11:46:26 -070019void __iomem *msm_timer_get_timer0_base(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070020int64_t msm_timer_get_sclk_time(int64_t *period);
Jeff Ohlsteinecefdc02012-01-13 12:37:44 -080021uint32_t msm_timer_get_sclk_ticks(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070022int msm_timer_init_time_sync(void (*timeout)(void));
Jeff Ohlsteine797f9d2012-04-02 12:10:28 -070023#ifndef CONFIG_ARM_ARCH_TIMER
24int64_t msm_timer_enter_idle(void);
25void msm_timer_exit_idle(int low_power);
26#else
27static inline int64_t msm_timer_enter_idle(void) { return 0; }
28static inline void msm_timer_exit_idle(int low_power) { return; }
29#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070030#endif