blob: 2aa288476a03788a1016b4a2121733fd06728a9e [file] [log] [blame]
Daniel Walker43b39f92010-03-03 08:54:11 -08001/* arch/arm/mach-msm/acpuclock.h
2 *
3 * MSM architecture clock driver header
4 *
5 * Copyright (C) 2007 Google, Inc.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07006 * Copyright (c) 2007-2010, Code Aurora Forum. All rights reserved.
Daniel Walker43b39f92010-03-03 08:54:11 -08007 * Author: San Mehat <san@android.com>
8 *
9 * This software is licensed under the terms of the GNU General Public
10 * License version 2, as published by the Free Software Foundation, and
11 * may be copied, distributed, and modified under those terms.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 */
19
20#ifndef __ARCH_ARM_MACH_MSM_ACPUCLOCK_H
21#define __ARCH_ARM_MACH_MSM_ACPUCLOCK_H
22
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070023#include <linux/list.h>
24
25enum setrate_reason {
26 SETRATE_CPUFREQ = 0,
27 SETRATE_SWFI,
28 SETRATE_PC,
29 SETRATE_HOTPLUG,
30 SETRATE_INIT,
31};
32
33int acpuclk_set_rate(int cpu, unsigned long rate, enum setrate_reason reason);
34unsigned long acpuclk_get_rate(int cpu);
Daniel Walker43b39f92010-03-03 08:54:11 -080035uint32_t acpuclk_get_switch_time(void);
36unsigned long acpuclk_wait_for_irq(void);
37unsigned long acpuclk_power_collapse(void);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070038#ifdef CONFIG_ARCH_MSM8960
39void acpuclock_secondary_init(void);
40#else
41static inline void acpuclock_secondary_init(void) { }
Daniel Walker43b39f92010-03-03 08:54:11 -080042#endif
43
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070044#endif