Merge tag 'v3.10.55' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-mt8127 / include / mach / mt_spm_mtcmos.h
1 #ifndef _MT_SPM_MTCMOS_
2 #define _MT_SPM_MTCMOS_
3
4 #include <linux/kernel.h>
5
6 #define STA_POWER_DOWN 0
7 #define STA_POWER_ON 1
8
9 /*
10 * 1. for CPU MTCMOS: CPU0, CPU1, CPU2, CPU3, DBG, CPUSYS
11 * 2. call spm_mtcmos_cpu_lock/unlock() before/after any operations
12 */
13 extern void spm_mtcmos_cpu_lock(unsigned long *flags);
14 extern void spm_mtcmos_cpu_unlock(unsigned long *flags);
15
16 extern int spm_mtcmos_ctrl_cpu0(int state, int chkWfiBeforePdn);
17 extern int spm_mtcmos_ctrl_cpu1(int state, int chkWfiBeforePdn);
18 extern int spm_mtcmos_ctrl_cpu2(int state, int chkWfiBeforePdn);
19 extern int spm_mtcmos_ctrl_cpu3(int state, int chkWfiBeforePdn);
20
21 extern int spm_mtcmos_ctrl_dbg(int state);
22 extern int spm_mtcmos_ctrl_cpusys(int state);
23
24 extern bool spm_cpusys_can_power_down(void);
25
26
27 /*
28 * 1. for non-CPU MTCMOS: VDEC, VENC, ISP, DISP, MFG, INFRA, DDRPHY, MDSYS1, MDSYS2
29 * 2. call spm_mtcmos_noncpu_lock/unlock() before/after any operations
30 */
31 //extern void spm_mtcmos_noncpu_lock(unsigned long *flags);
32 //extern void spm_mtcmos_noncpu_unlock(unsigned long *flags);
33
34 extern int spm_mtcmos_ctrl_vdec(int state);
35 //extern int spm_mtcmos_ctrl_venc(int state);
36 extern int spm_mtcmos_ctrl_isp(int state);
37 extern int spm_mtcmos_ctrl_disp(int state);
38 extern int spm_mtcmos_ctrl_mfg(int state);
39
40 extern int spm_mtcmos_ctrl_infra(int state);
41 extern int spm_mtcmos_ctrl_ddrphy(int state);
42
43 extern int spm_mtcmos_ctrl_mdsys1(int state);
44 //extern int spm_mtcmos_ctrl_mdsys2(int state);
45 extern int spm_mtcmos_ctrl_connsys(int state);
46
47 extern int test_spm_gpu_power_on(void);
48
49 #endif