blob: c6d7bd4b4f74862896cc0310f86a23f79a08cd21 [file] [log] [blame]
Greg Reidcf105492012-10-12 12:14:12 -04001/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
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#ifndef _ARM_KERNEL_USER_ACCESSIBLE_TIMER_H_
14#define _ARM_KERNEL_USER_ACCESSIBLE_TIMER_H_
15
16#define ARM_USER_ACCESSIBLE_TIMERS_INVALID_PAGE -1
17
18extern unsigned long zero_pfn;
19
20#ifdef CONFIG_ARM_USE_USER_ACCESSIBLE_TIMERS
21#ifndef CONFIG_ARM_USER_ACCESSIBLE_TIMER_BASE
22#define CONFIG_ARM_USER_ACCESSIBLE_TIMER_BASE 0xfffef000
23#endif
24extern void setup_user_timer_offset(unsigned long addr);
25extern int get_timer_page_address(void);
26static inline int get_user_accessible_timers_base(void)
27{
28 return CONFIG_ARM_USER_ACCESSIBLE_TIMER_BASE;
29}
30extern void set_user_accessible_timer_flag(bool flag);
31#else
32#define CONFIG_ARM_USER_ACCESSIBLE_TIMER_BASE 0
33static inline void setup_user_timer_offset(unsigned long addr)
34{
35}
36static inline int get_timer_page_address(void)
37{
38 return ARM_USER_ACCESSIBLE_TIMERS_INVALID_PAGE;
39}
40static inline int get_user_accessible_timers_base(void)
41{
42 return 0;
43}
44static inline void set_user_accessible_timer_flag(bool flag)
45{
46}
47#endif
48
49#endif