Daniel Walker | 43b39f9 | 2010-03-03 08:54:11 -0800 | [diff] [blame] | 1 | /* arch/arm/mach-msm/acpuclock.h |
| 2 | * |
| 3 | * MSM architecture clock driver header |
| 4 | * |
| 5 | * Copyright (C) 2007 Google, Inc. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame^] | 6 | * Copyright (c) 2007-2010, Code Aurora Forum. All rights reserved. |
Daniel Walker | 43b39f9 | 2010-03-03 08:54:11 -0800 | [diff] [blame] | 7 | * 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame^] | 23 | #include <linux/list.h> |
| 24 | |
| 25 | enum setrate_reason { |
| 26 | SETRATE_CPUFREQ = 0, |
| 27 | SETRATE_SWFI, |
| 28 | SETRATE_PC, |
| 29 | SETRATE_HOTPLUG, |
| 30 | SETRATE_INIT, |
| 31 | }; |
| 32 | |
| 33 | int acpuclk_set_rate(int cpu, unsigned long rate, enum setrate_reason reason); |
| 34 | unsigned long acpuclk_get_rate(int cpu); |
Daniel Walker | 43b39f9 | 2010-03-03 08:54:11 -0800 | [diff] [blame] | 35 | uint32_t acpuclk_get_switch_time(void); |
| 36 | unsigned long acpuclk_wait_for_irq(void); |
| 37 | unsigned long acpuclk_power_collapse(void); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame^] | 38 | #ifdef CONFIG_ARCH_MSM8960 |
| 39 | void acpuclock_secondary_init(void); |
| 40 | #else |
| 41 | static inline void acpuclock_secondary_init(void) { } |
Daniel Walker | 43b39f9 | 2010-03-03 08:54:11 -0800 | [diff] [blame] | 42 | #endif |
| 43 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame^] | 44 | #endif |