blob: 5b63d756f45bb6fd3992b174b816bfc23023ca00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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
|