upload tizen1.0 source
[kernel/linux-2.6.36.git] / arch / arm / mach-s5pv310 / include / mach / cpufreq.h
1 /* linux/arch/arm/mach-s5pv310/include/mach/cpufreq.h
2  *
3  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4  *              http://www.samsung.com
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 version 2 as
8  * published by the Free Software Foundation.
9 */
10
11 /* CPUFreq for S5PV310/S5PC210 */
12
13 /* CPU frequency level index for using cpufreq lock API
14  * This should be same with cpufreq_frequency_table
15 */
16 #ifndef __MACH_CPUFREQ_H
17 #define __MACH_CPUFREQ_H __FILE__
18 #include <linux/cpufreq.h>
19
20 enum cpufreq_level_request{
21 #ifdef CONFIG_S5PV310_ENABLE_1200MHZ
22         CPU_L0,         /* 1200MHz */
23 #endif
24         CPU_L1,         /* 1000MHz */
25         CPU_L2,         /* 800MHz */
26         CPU_L3,         /* 500MHz */
27         CPU_L4,         /* 200MHz */
28         CPU_LEVEL_END,
29 };
30
31 enum busfreq_level_request{
32         BUS_L0,         /* MEM 400MHz BUS 200MHz */
33         BUS_L1,         /* MEM 267MHz BUS 160MHz */
34         BUS_L2,         /* MEM 133MHz BUS 133MHz */
35 #if defined(CONFIG_S5PV310_INT_L3)
36         BUS_L3,         /* MEM 66MHz BUS 66MHz */
37 #endif
38         BUS_LEVEL_END,
39 };
40
41 enum cpufreq_lock_ID{
42         DVFS_LOCK_ID_G2D,       /* G2D */
43         DVFS_LOCK_ID_TV,        /* TV */
44         DVFS_LOCK_ID_MFC,       /* MFC */
45         DVFS_LOCK_ID_USB,       /* USB */
46         DVFS_LOCK_ID_CAM,       /* CAM */
47         DVFS_LOCK_ID_APP,       /* APP */
48         DVFS_LOCK_ID_PM,
49 #if CONFIG_TOUCHSCREEN_MXT224U1
50         DVFS_LOCK_ID_TSP,   /*TSP*/
51 #endif
52         DVFS_LOCK_ID_TMU,       /* TMU */
53         DVFS_LOCK_ID_END,
54 };
55
56 extern int s5pv310_cpufreq_lock(unsigned int nId,
57                         enum cpufreq_level_request cpufreq_level);
58 extern void s5pv310_cpufreq_lock_free(unsigned int nId);
59
60 extern int s5pv310_busfreq_lock(unsigned int nId,
61                         enum busfreq_level_request busfreq_level);
62 extern void s5pv310_busfreq_lock_free(unsigned int nId);
63
64 int s5pv310_cpufreq_upper_limit(unsigned int nId, enum cpufreq_level_request cpufreq_level);
65 void s5pv310_cpufreq_upper_limit_free(unsigned int nId);
66
67 extern void s5pv310_busfreq_force_notify(struct cpufreq_freqs *freq);
68
69 #endif /* __MACH_CPUFREQ_H */