summaryrefslogtreecommitdiff
path: root/include/linux/sprd_cpu_cooling.h
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
committerYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
commit8e4bff4cab0ddac6060645b0715210484d02ff40 (patch)
tree3a5c3024371a04692a3a6d9974d001cdff8ebf84 /include/linux/sprd_cpu_cooling.h
Initial file dump from open source releaseHEADmaster
Diffstat (limited to 'include/linux/sprd_cpu_cooling.h')
-rw-r--r--include/linux/sprd_cpu_cooling.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/include/linux/sprd_cpu_cooling.h b/include/linux/sprd_cpu_cooling.h
new file mode 100644
index 00000000..5b63d756
--- /dev/null
+++ b/include/linux/sprd_cpu_cooling.h
@@ -0,0 +1,55 @@
+/*
+ * linux/include/linux/sprd_cpu_cooling.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *
+ */
+
+#ifndef __SPRD_CPU_COOLING_H__
+#define __SPRD_CPU_COOLING_H__
+
+#define MAX_CPU_STATE 8
+
+struct cooling_state {
+ int max_freq;
+ int max_core;
+};
+
+struct freq_vddarm {
+ unsigned int freq;
+ unsigned int vddarm_mv;
+};
+
+struct vddarm_update {
+ unsigned long state;
+ struct freq_vddarm *freq_vddarm;
+};
+struct sprd_cpu_cooling_platform_data {
+ struct cooling_state cpu_state[MAX_CPU_STATE];
+ struct vddarm_update *vddarm_update;
+ int state_num;
+ void *devdata;
+};
+
+#ifdef CONFIG_CPU_FREQ
+extern int cpufreq_thermal_limit(int cluster, int limit_freq);
+extern int cpufreq_table_thermal_update(int freq, int vdd_arm);
+#else
+extern int cpufreq_thermal_limit(int cluster, int limit_freq) {return 0;}
+extern int cpufreq_table_thermal_update(int freq, int vdd_arm) {return 0;}
+#endif //CONFIG_CPU_FREQ
+
+extern int cpu_core_thermal_limit(int cluster, int limit_core);
+#endif
+