blob: 24d2a35ecbb94905f5a78f7f63f62186ef087e58 [file] [log] [blame]
Greg Reidb1d240a2012-10-12 12:20:31 -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#include <linux/mm.h>
14#include <linux/export.h>
15#include <asm/user_accessible_timer.h>
16#include "mach/socinfo.h"
17#include "mach/msm_iomap.h"
18
19#include "timer.h"
20
21inline int get_timer_page_address(void)
22{
23 if (!use_user_accessible_timers())
24 return ARM_USER_ACCESSIBLE_TIMERS_INVALID_PAGE;
25
26 if (cpu_is_msm8960())
27 return MSM8960_TMR0_PHYS;
28 else if (cpu_is_msm8930())
29 return MSM8930_TMR0_PHYS;
30 else if (cpu_is_apq8064())
31 return APQ8064_TMR0_PHYS;
32 else
33 return ARM_USER_ACCESSIBLE_TIMERS_INVALID_PAGE;
34}
35EXPORT_SYMBOL(get_timer_page_address);
36