@@ -69,27 +69,27 @@ struct meson_ee_pwrc_domain_desc {
69
69
char * name ;
70
70
unsigned int reset_names_count ;
71
71
unsigned int clk_names_count ;
72
- struct meson_ee_pwrc_top_domain * top_pd ;
72
+ const struct meson_ee_pwrc_top_domain * top_pd ;
73
73
unsigned int mem_pd_count ;
74
- struct meson_ee_pwrc_mem_domain * mem_pd ;
74
+ const struct meson_ee_pwrc_mem_domain * mem_pd ;
75
75
bool (* is_powered_off )(struct meson_ee_pwrc_domain * pwrc_domain );
76
76
};
77
77
78
78
struct meson_ee_pwrc_domain_data {
79
79
unsigned int count ;
80
- struct meson_ee_pwrc_domain_desc * domains ;
80
+ const struct meson_ee_pwrc_domain_desc * domains ;
81
81
};
82
82
83
83
/* TOP Power Domains */
84
84
85
- static struct meson_ee_pwrc_top_domain gx_pwrc_vpu = {
85
+ static const struct meson_ee_pwrc_top_domain gx_pwrc_vpu = {
86
86
.sleep_reg = GX_AO_RTI_GEN_PWR_SLEEP0 ,
87
87
.sleep_mask = BIT (8 ),
88
88
.iso_reg = GX_AO_RTI_GEN_PWR_SLEEP0 ,
89
89
.iso_mask = BIT (9 ),
90
90
};
91
91
92
- static struct meson_ee_pwrc_top_domain meson8_pwrc_vpu = {
92
+ static const struct meson_ee_pwrc_top_domain meson8_pwrc_vpu = {
93
93
.sleep_reg = MESON8_AO_RTI_GEN_PWR_SLEEP0 ,
94
94
.sleep_mask = BIT (8 ),
95
95
.iso_reg = MESON8_AO_RTI_GEN_PWR_SLEEP0 ,
@@ -104,20 +104,20 @@ static struct meson_ee_pwrc_top_domain meson8_pwrc_vpu = {
104
104
.iso_mask = BIT(__bit), \
105
105
}
106
106
107
- static struct meson_ee_pwrc_top_domain sm1_pwrc_vpu = SM1_EE_PD (8 );
108
- static struct meson_ee_pwrc_top_domain sm1_pwrc_nna = SM1_EE_PD (16 );
109
- static struct meson_ee_pwrc_top_domain sm1_pwrc_usb = SM1_EE_PD (17 );
110
- static struct meson_ee_pwrc_top_domain sm1_pwrc_pci = SM1_EE_PD (18 );
111
- static struct meson_ee_pwrc_top_domain sm1_pwrc_ge2d = SM1_EE_PD (19 );
107
+ static const struct meson_ee_pwrc_top_domain sm1_pwrc_vpu = SM1_EE_PD (8 );
108
+ static const struct meson_ee_pwrc_top_domain sm1_pwrc_nna = SM1_EE_PD (16 );
109
+ static const struct meson_ee_pwrc_top_domain sm1_pwrc_usb = SM1_EE_PD (17 );
110
+ static const struct meson_ee_pwrc_top_domain sm1_pwrc_pci = SM1_EE_PD (18 );
111
+ static const struct meson_ee_pwrc_top_domain sm1_pwrc_ge2d = SM1_EE_PD (19 );
112
112
113
- static struct meson_ee_pwrc_top_domain g12a_pwrc_nna = {
113
+ static const struct meson_ee_pwrc_top_domain g12a_pwrc_nna = {
114
114
.sleep_reg = GX_AO_RTI_GEN_PWR_SLEEP0 ,
115
115
.sleep_mask = BIT (16 ) | BIT (17 ),
116
116
.iso_reg = GX_AO_RTI_GEN_PWR_ISO0 ,
117
117
.iso_mask = BIT (16 ) | BIT (17 ),
118
118
};
119
119
120
- static struct meson_ee_pwrc_top_domain g12a_pwrc_isp = {
120
+ static const struct meson_ee_pwrc_top_domain g12a_pwrc_isp = {
121
121
.sleep_reg = GX_AO_RTI_GEN_PWR_SLEEP0 ,
122
122
.sleep_mask = BIT (18 ) | BIT (19 ),
123
123
.iso_reg = GX_AO_RTI_GEN_PWR_ISO0 ,
@@ -154,39 +154,39 @@ static struct meson_ee_pwrc_top_domain g12a_pwrc_isp = {
154
154
{ __reg, BIT(14) }, \
155
155
{ __reg, BIT(15) }
156
156
157
- static struct meson_ee_pwrc_mem_domain axg_pwrc_mem_vpu [] = {
157
+ static const struct meson_ee_pwrc_mem_domain axg_pwrc_mem_vpu [] = {
158
158
VPU_MEMPD (HHI_VPU_MEM_PD_REG0 ),
159
159
VPU_HHI_MEMPD (HHI_MEM_PD_REG0 ),
160
160
};
161
161
162
- static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_vpu [] = {
162
+ static const struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_vpu [] = {
163
163
VPU_MEMPD (HHI_VPU_MEM_PD_REG0 ),
164
164
VPU_MEMPD (HHI_VPU_MEM_PD_REG1 ),
165
165
VPU_MEMPD (HHI_VPU_MEM_PD_REG2 ),
166
166
VPU_HHI_MEMPD (HHI_MEM_PD_REG0 ),
167
167
};
168
168
169
- static struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu [] = {
169
+ static const struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu [] = {
170
170
VPU_MEMPD (HHI_VPU_MEM_PD_REG0 ),
171
171
VPU_MEMPD (HHI_VPU_MEM_PD_REG1 ),
172
172
VPU_HHI_MEMPD (HHI_MEM_PD_REG0 ),
173
173
};
174
174
175
- static struct meson_ee_pwrc_mem_domain meson_pwrc_mem_eth [] = {
175
+ static const struct meson_ee_pwrc_mem_domain meson_pwrc_mem_eth [] = {
176
176
{ HHI_MEM_PD_REG0 , GENMASK (3 , 2 ) },
177
177
};
178
178
179
- static struct meson_ee_pwrc_mem_domain meson8_pwrc_audio_dsp_mem [] = {
179
+ static const struct meson_ee_pwrc_mem_domain meson8_pwrc_audio_dsp_mem [] = {
180
180
{ HHI_MEM_PD_REG0 , GENMASK (1 , 0 ) },
181
181
};
182
182
183
- static struct meson_ee_pwrc_mem_domain meson8_pwrc_mem_vpu [] = {
183
+ static const struct meson_ee_pwrc_mem_domain meson8_pwrc_mem_vpu [] = {
184
184
VPU_MEMPD (HHI_VPU_MEM_PD_REG0 ),
185
185
VPU_MEMPD (HHI_VPU_MEM_PD_REG1 ),
186
186
VPU_HHI_MEMPD (HHI_MEM_PD_REG0 ),
187
187
};
188
188
189
- static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_vpu [] = {
189
+ static const struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_vpu [] = {
190
190
VPU_MEMPD (HHI_VPU_MEM_PD_REG0 ),
191
191
VPU_MEMPD (HHI_VPU_MEM_PD_REG1 ),
192
192
VPU_MEMPD (HHI_VPU_MEM_PD_REG2 ),
@@ -198,28 +198,28 @@ static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_vpu[] = {
198
198
VPU_HHI_MEMPD (HHI_MEM_PD_REG0 ),
199
199
};
200
200
201
- static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_nna [] = {
201
+ static const struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_nna [] = {
202
202
{ HHI_NANOQ_MEM_PD_REG0 , 0xff },
203
203
{ HHI_NANOQ_MEM_PD_REG1 , 0xff },
204
204
};
205
205
206
- static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_usb [] = {
206
+ static const struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_usb [] = {
207
207
{ HHI_MEM_PD_REG0 , GENMASK (31 , 30 ) },
208
208
};
209
209
210
- static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_pcie [] = {
210
+ static const struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_pcie [] = {
211
211
{ HHI_MEM_PD_REG0 , GENMASK (29 , 26 ) },
212
212
};
213
213
214
- static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_ge2d [] = {
214
+ static const struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_ge2d [] = {
215
215
{ HHI_MEM_PD_REG0 , GENMASK (25 , 18 ) },
216
216
};
217
217
218
- static struct meson_ee_pwrc_mem_domain axg_pwrc_mem_audio [] = {
218
+ static const struct meson_ee_pwrc_mem_domain axg_pwrc_mem_audio [] = {
219
219
{ HHI_MEM_PD_REG0 , GENMASK (5 , 4 ) },
220
220
};
221
221
222
- static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_audio [] = {
222
+ static const struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_audio [] = {
223
223
{ HHI_MEM_PD_REG0 , GENMASK (5 , 4 ) },
224
224
{ HHI_AUDIO_MEM_PD_REG0 , GENMASK (1 , 0 ) },
225
225
{ HHI_AUDIO_MEM_PD_REG0 , GENMASK (3 , 2 ) },
@@ -235,12 +235,12 @@ static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_audio[] = {
235
235
{ HHI_AUDIO_MEM_PD_REG0 , GENMASK (27 , 26 ) },
236
236
};
237
237
238
- static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_nna [] = {
238
+ static const struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_nna [] = {
239
239
{ G12A_HHI_NANOQ_MEM_PD_REG0 , GENMASK (31 , 0 ) },
240
240
{ G12A_HHI_NANOQ_MEM_PD_REG1 , GENMASK (31 , 0 ) },
241
241
};
242
242
243
- static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_isp [] = {
243
+ static const struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_isp [] = {
244
244
{ G12A_HHI_ISP_MEM_PD_REG0 , GENMASK (31 , 0 ) },
245
245
{ G12A_HHI_ISP_MEM_PD_REG1 , GENMASK (31 , 0 ) },
246
246
};
@@ -270,14 +270,14 @@ static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_isp[] = {
270
270
271
271
static bool pwrc_ee_is_powered_off (struct meson_ee_pwrc_domain * pwrc_domain );
272
272
273
- static struct meson_ee_pwrc_domain_desc axg_pwrc_domains [] = {
273
+ static const struct meson_ee_pwrc_domain_desc axg_pwrc_domains [] = {
274
274
[PWRC_AXG_VPU_ID ] = VPU_PD ("VPU" , & gx_pwrc_vpu , axg_pwrc_mem_vpu ,
275
275
pwrc_ee_is_powered_off , 5 , 2 ),
276
276
[PWRC_AXG_ETHERNET_MEM_ID ] = MEM_PD ("ETH" , meson_pwrc_mem_eth ),
277
277
[PWRC_AXG_AUDIO_ID ] = MEM_PD ("AUDIO" , axg_pwrc_mem_audio ),
278
278
};
279
279
280
- static struct meson_ee_pwrc_domain_desc g12a_pwrc_domains [] = {
280
+ static const struct meson_ee_pwrc_domain_desc g12a_pwrc_domains [] = {
281
281
[PWRC_G12A_VPU_ID ] = VPU_PD ("VPU" , & gx_pwrc_vpu , g12a_pwrc_mem_vpu ,
282
282
pwrc_ee_is_powered_off , 11 , 2 ),
283
283
[PWRC_G12A_ETH_ID ] = MEM_PD ("ETH" , meson_pwrc_mem_eth ),
@@ -287,13 +287,13 @@ static struct meson_ee_pwrc_domain_desc g12a_pwrc_domains[] = {
287
287
pwrc_ee_is_powered_off ),
288
288
};
289
289
290
- static struct meson_ee_pwrc_domain_desc gxbb_pwrc_domains [] = {
290
+ static const struct meson_ee_pwrc_domain_desc gxbb_pwrc_domains [] = {
291
291
[PWRC_GXBB_VPU_ID ] = VPU_PD ("VPU" , & gx_pwrc_vpu , gxbb_pwrc_mem_vpu ,
292
292
pwrc_ee_is_powered_off , 12 , 2 ),
293
293
[PWRC_GXBB_ETHERNET_MEM_ID ] = MEM_PD ("ETH" , meson_pwrc_mem_eth ),
294
294
};
295
295
296
- static struct meson_ee_pwrc_domain_desc meson8_pwrc_domains [] = {
296
+ static const struct meson_ee_pwrc_domain_desc meson8_pwrc_domains [] = {
297
297
[PWRC_MESON8_VPU_ID ] = VPU_PD ("VPU" , & meson8_pwrc_vpu ,
298
298
meson8_pwrc_mem_vpu ,
299
299
pwrc_ee_is_powered_off , 0 , 1 ),
@@ -303,7 +303,7 @@ static struct meson_ee_pwrc_domain_desc meson8_pwrc_domains[] = {
303
303
meson8_pwrc_audio_dsp_mem ),
304
304
};
305
305
306
- static struct meson_ee_pwrc_domain_desc meson8b_pwrc_domains [] = {
306
+ static const struct meson_ee_pwrc_domain_desc meson8b_pwrc_domains [] = {
307
307
[PWRC_MESON8_VPU_ID ] = VPU_PD ("VPU" , & meson8_pwrc_vpu ,
308
308
meson8_pwrc_mem_vpu ,
309
309
pwrc_ee_is_powered_off , 11 , 1 ),
@@ -313,7 +313,7 @@ static struct meson_ee_pwrc_domain_desc meson8b_pwrc_domains[] = {
313
313
meson8_pwrc_audio_dsp_mem ),
314
314
};
315
315
316
- static struct meson_ee_pwrc_domain_desc sm1_pwrc_domains [] = {
316
+ static const struct meson_ee_pwrc_domain_desc sm1_pwrc_domains [] = {
317
317
[PWRC_SM1_VPU_ID ] = VPU_PD ("VPU" , & sm1_pwrc_vpu , sm1_pwrc_mem_vpu ,
318
318
pwrc_ee_is_powered_off , 11 , 2 ),
319
319
[PWRC_SM1_NNA_ID ] = TOP_PD ("NNA" , & sm1_pwrc_nna , sm1_pwrc_mem_nna ,
@@ -576,32 +576,32 @@ static void meson_ee_pwrc_shutdown(struct platform_device *pdev)
576
576
}
577
577
}
578
578
579
- static struct meson_ee_pwrc_domain_data meson_ee_g12a_pwrc_data = {
579
+ static const struct meson_ee_pwrc_domain_data meson_ee_g12a_pwrc_data = {
580
580
.count = ARRAY_SIZE (g12a_pwrc_domains ),
581
581
.domains = g12a_pwrc_domains ,
582
582
};
583
583
584
- static struct meson_ee_pwrc_domain_data meson_ee_axg_pwrc_data = {
584
+ static const struct meson_ee_pwrc_domain_data meson_ee_axg_pwrc_data = {
585
585
.count = ARRAY_SIZE (axg_pwrc_domains ),
586
586
.domains = axg_pwrc_domains ,
587
587
};
588
588
589
- static struct meson_ee_pwrc_domain_data meson_ee_gxbb_pwrc_data = {
589
+ static const struct meson_ee_pwrc_domain_data meson_ee_gxbb_pwrc_data = {
590
590
.count = ARRAY_SIZE (gxbb_pwrc_domains ),
591
591
.domains = gxbb_pwrc_domains ,
592
592
};
593
593
594
- static struct meson_ee_pwrc_domain_data meson_ee_m8_pwrc_data = {
594
+ static const struct meson_ee_pwrc_domain_data meson_ee_m8_pwrc_data = {
595
595
.count = ARRAY_SIZE (meson8_pwrc_domains ),
596
596
.domains = meson8_pwrc_domains ,
597
597
};
598
598
599
- static struct meson_ee_pwrc_domain_data meson_ee_m8b_pwrc_data = {
599
+ static const struct meson_ee_pwrc_domain_data meson_ee_m8b_pwrc_data = {
600
600
.count = ARRAY_SIZE (meson8b_pwrc_domains ),
601
601
.domains = meson8b_pwrc_domains ,
602
602
};
603
603
604
- static struct meson_ee_pwrc_domain_data meson_ee_sm1_pwrc_data = {
604
+ static const struct meson_ee_pwrc_domain_data meson_ee_sm1_pwrc_data = {
605
605
.count = ARRAY_SIZE (sm1_pwrc_domains ),
606
606
.domains = sm1_pwrc_domains ,
607
607
};
0 commit comments