aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/cpu-tegra.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/mach-tegra/cpu-tegra.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'arch/arm/mach-tegra/cpu-tegra.h')
-rw-r--r--arch/arm/mach-tegra/cpu-tegra.h86
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
24unsigned int tegra_getspeed(unsigned int cpu);
25int tegra_cpu_set_speed_cap(unsigned int *speed_cap);
26unsigned int tegra_count_slow_cpus(unsigned long speed_limit);
27unsigned int tegra_get_slowest_cpu_n(void);
28unsigned long tegra_cpu_lowest_speed(void);
29unsigned long tegra_cpu_highest_speed(void);
30
31#ifdef CONFIG_TEGRA_THERMAL_THROTTLE
32int tegra_throttle_init(struct mutex *cpu_lock);
33void tegra_throttle_exit(void);
34bool tegra_is_throttling(void);
35unsigned int tegra_throttle_governor_speed(unsigned int requested_speed);
36int tegra_throttle_debug_init(struct dentry *cpu_tegra_debugfs_root);
37void tegra_throttling_enable(bool enable);
38#else
39static inline int tegra_throttle_init(struct mutex *cpu_lock)
40{ return 0; }
41static inline void tegra_throttle_exit(void)
42{}
43static inline bool tegra_is_throttling(void)
44{ return false; }
45static inline unsigned int tegra_throttle_governor_speed(
46 unsigned int requested_speed)
47{ return requested_speed; }
48static inline int tegra_throttle_debug_init(
49 struct dentry *cpu_tegra_debugfs_root)
50{ return 0; }
51static 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)
56int tegra_auto_hotplug_init(struct mutex *cpu_lock);
57void tegra_auto_hotplug_exit(void);
58void tegra_auto_hotplug_governor(unsigned int cpu_freq, bool suspend);
59#else
60static inline int tegra_auto_hotplug_init(struct mutex *cpu_lock)
61{ return 0; }
62static inline void tegra_auto_hotplug_exit(void)
63{ }
64static inline void tegra_auto_hotplug_governor(unsigned int cpu_freq,
65 bool suspend)
66{ }
67#endif
68
69#ifdef CONFIG_TEGRA_EDP_LIMITS
70bool tegra_cpu_edp_favor_up(unsigned int n, int mp_overhead);
71bool tegra_cpu_edp_favor_down(unsigned int n, int mp_overhead);
72#else
73static inline bool tegra_cpu_edp_favor_up(unsigned int n, int mp_overhead)
74{ return true; }
75static inline bool tegra_cpu_edp_favor_down(unsigned int n, int mp_overhead)
76{ return false; }
77#endif
78
79#ifdef CONFIG_CPU_FREQ
80int tegra_suspended_target(unsigned int target_freq);
81#else
82static inline int tegra_suspended_target(unsigned int target_freq)
83{ return -ENOSYS; }
84#endif
85
86#endif /* __MACH_TEGRA_CPU_TEGRA_H */