mm_power_ctrl.h
5.17 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2001
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* mm_power_ctrl.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* Header file for mm_power_ctrl
*
* Author:
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#ifndef __MM_POWER_CTRL_H__
#define __MM_POWER_CTRL_H__
#include "kal_public_api.h"
#include "mmsys_pwrmgr.h"
#include "kal_general_types.h"
/******************************************************************************
* API functions
*****************************************************************************/
/**
* Turn off MM module clock. And turn off MM SUBSYS for saving power if no
* other MM modules are still turned on.
*
* @param module The definition of clock gating bit for the module to be
* turned off. For MT6268, please refer to drvpdn_oldpdnarch.h.
* To turn on JPEG on MT6268, please use MMCG_CON0_JPEG.
* For MT6236, please refer to pdn_hw_mt6236_series.h. To turn
* on JPEG on MT6236, please use MMSYS_CG_CON_JPG.
*
* @remark Please try prevent to call this function in ISR level...and
* please do not use i-bit to protect this function.
*/
extern void mm_disable_power(kal_uint32 module);
/**
* Turn on MM module clock. And turn on MM SUBSYS for saving power if no
* other MM modules are still turned on.
*
* @param module The definition of clock gating bit for the module to be
* turned off. For MT6268, please refer to drvpdn_oldpdnarch.h.
* To turn on JPEG on MT6268, please use MMCG_CON0_JPEG.
* For MT6236, please refer to pdn_hw_mt6236_series.h. To turn
* on JPEG on MT6236, please use MMSYS_CG_CON_JPG.
*
* @remark Please try prevent to call this function in ISR level...and
* please do not use i-bit to protect this function.
*/
extern void mm_enable_power(kal_uint32 module);
/**
* Turn off MM module clock. MM SUBSYS is not turned off even there is no
* other MM module is on.
*
* @param module The definition of clock gating bit for the module to be
* turned off. For MT6268, please refer to drvpdn_oldpdnarch.h.
* To turn on JPEG on MT6268, please use MMCG_CON0_JPEG.
* For MT6236, please refer to pdn_hw_mt6236_series.h. To turn
* on JPEG on MT6236, please use MMSYS_CG_CON_JPG.
*
* @remark Please try prevent to call this function in ISR level...and
* please do not use i-bit to protect this function. Please try to
* pair with mm_enable_clock. If no special requirements to lock
* MM SUBSYS power on/off, please use mm_disable_power instead.
*/
extern void mm_disable_clock(kal_uint32 module);
/**
* Turn on MM module clock. MM SUBSYS is not turned on with this function
* even MM SUBSYS is in off state.
*
* @param module The definition of clock gating bit for the module to be
* turned off. For MT6268, please refer to drvpdn_oldpdnarch.h.
* To turn on JPEG on MT6268, please use MMCG_CON0_JPEG.
* For MT6236, please refer to pdn_hw_mt6236_series.h. To turn
* on JPEG on MT6236, please use MMSYS_CG_CON_JPG.
*
* @remark Please try prevent to call this function in ISR level...and
* please do not use i-bit to protect this function. If no special
* requirements to lock MM SUBSYS power on/off, please use
* mm_enable_power instead.
*/
extern void mm_enable_clock(kal_uint32 module);
extern kal_bool mm_query_clock_status(kal_uint32 module);
#endif /* __MM_POWER_CTRL_H__ */