diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/mach-tegra/cpu-tegra.h | |
parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) |
Diffstat (limited to 'arch/arm/mach-tegra/cpu-tegra.h')
-rw-r--r-- | arch/arm/mach-tegra/cpu-tegra.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/cpu-tegra.h b/arch/arm/mach-tegra/cpu-tegra.h new file mode 100644 index 00000000000..2bba460514f --- /dev/null +++ b/arch/arm/mach-tegra/cpu-tegra.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/cpu-tegra.h | ||
3 | * | ||
4 | * Copyright (c) 2011-2012, NVIDIA Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __MACH_TEGRA_CPU_TEGRA_H | ||
22 | #define __MACH_TEGRA_CPU_TEGRA_H | ||
23 | |||
24 | unsigned int tegra_getspeed(unsigned int cpu); | ||
25 | int tegra_cpu_set_speed_cap(unsigned int *speed_cap); | ||
26 | unsigned int tegra_count_slow_cpus(unsigned long speed_limit); | ||
27 | unsigned int tegra_get_slowest_cpu_n(void); | ||
28 | unsigned long tegra_cpu_lowest_speed(void); | ||
29 | unsigned long tegra_cpu_highest_speed(void); | ||
30 | |||
31 | #ifdef CONFIG_TEGRA_THERMAL_THROTTLE | ||
32 | int tegra_throttle_init(struct mutex *cpu_lock); | ||
33 | void tegra_throttle_exit(void); | ||
34 | bool tegra_is_throttling(void); | ||
35 | unsigned int tegra_throttle_governor_speed(unsigned int requested_speed); | ||
36 | int tegra_throttle_debug_init(struct dentry *cpu_tegra_debugfs_root); | ||
37 | void tegra_throttling_enable(bool enable); | ||
38 | #else | ||
39 | static inline int tegra_throttle_init(struct mutex *cpu_lock) | ||
40 | { return 0; } | ||
41 | static inline void tegra_throttle_exit(void) | ||
42 | {} | ||
43 | static inline bool tegra_is_throttling(void) | ||
44 | { return false; } | ||
45 | static inline unsigned int tegra_throttle_governor_speed( | ||
46 | unsigned int requested_speed) | ||
47 | { return requested_speed; } | ||
48 | static inline int tegra_throttle_debug_init( | ||
49 | struct dentry *cpu_tegra_debugfs_root) | ||
50 | { return 0; } | ||
51 | static inline void tegra_throttling_enable(bool enable) | ||
52 | {} | ||
53 | #endif /* CONFIG_TEGRA_THERMAL_THROTTLE */ | ||
54 | |||
55 | #if defined(CONFIG_TEGRA_AUTO_HOTPLUG) && !defined(CONFIG_ARCH_TEGRA_2x_SOC) | ||
56 | int tegra_auto_hotplug_init(struct mutex *cpu_lock); | ||
57 | void tegra_auto_hotplug_exit(void); | ||
58 | void tegra_auto_hotplug_governor(unsigned int cpu_freq, bool suspend); | ||
59 | #else | ||
60 | static inline int tegra_auto_hotplug_init(struct mutex *cpu_lock) | ||
61 | { return 0; } | ||
62 | static inline void tegra_auto_hotplug_exit(void) | ||
63 | { } | ||
64 | static inline void tegra_auto_hotplug_governor(unsigned int cpu_freq, | ||
65 | bool suspend) | ||
66 | { } | ||
67 | #endif | ||
68 | |||
69 | #ifdef CONFIG_TEGRA_EDP_LIMITS | ||
70 | bool tegra_cpu_edp_favor_up(unsigned int n, int mp_overhead); | ||
71 | bool tegra_cpu_edp_favor_down(unsigned int n, int mp_overhead); | ||
72 | #else | ||
73 | static inline bool tegra_cpu_edp_favor_up(unsigned int n, int mp_overhead) | ||
74 | { return true; } | ||
75 | static inline bool tegra_cpu_edp_favor_down(unsigned int n, int mp_overhead) | ||
76 | { return false; } | ||
77 | #endif | ||
78 | |||
79 | #ifdef CONFIG_CPU_FREQ | ||
80 | int tegra_suspended_target(unsigned int target_freq); | ||
81 | #else | ||
82 | static inline int tegra_suspended_target(unsigned int target_freq) | ||
83 | { return -ENOSYS; } | ||
84 | #endif | ||
85 | |||
86 | #endif /* __MACH_TEGRA_CPU_TEGRA_H */ | ||