Lines Matching refs:res
16 uint32_t res; in spm_hwcg_index2res() local
23 res = (MT_SPM_DRAM_S0 | MT_SPM_DRAM_S1 | MT_SPM_EMI); in spm_hwcg_index2res()
26 res = MT_SPM_SYSPLL; in spm_hwcg_index2res()
29 res = MT_SPM_INFRA; in spm_hwcg_index2res()
32 res = MT_SPM_PMIC; in spm_hwcg_index2res()
35 res = MT_SPM_26M; in spm_hwcg_index2res()
38 res = MT_SPM_VCORE; in spm_hwcg_index2res()
41 res = 0; in spm_hwcg_index2res()
43 return res; in spm_hwcg_index2res()
85 void spm_hwcg_ctrl(uint32_t res, enum spm_hwcg_setting type, in spm_hwcg_ctrl() argument
90 if (res & (MT_SPM_DRAM_S0 | MT_SPM_DRAM_S1 | MT_SPM_EMI)) in spm_hwcg_ctrl()
92 else if (res & MT_SPM_SYSPLL) in spm_hwcg_ctrl()
94 else if (res & MT_SPM_INFRA) in spm_hwcg_ctrl()
96 else if (res & MT_SPM_PMIC) in spm_hwcg_ctrl()
98 else if (res & MT_SPM_26M) in spm_hwcg_ctrl()
100 else if (res & MT_SPM_VCORE) in spm_hwcg_ctrl()
112 uint32_t res = spm_hwcg_index2res(idx); in spm_hwcg_ctrl_by_index() local
114 if (res) in spm_hwcg_ctrl_by_index()
115 spm_hwcg_ctrl(res, type, is_set, val); in spm_hwcg_ctrl_by_index()
118 static uint32_t spm_hwcg_mask_get(uint32_t res, enum spm_hwcg_setting type) in spm_hwcg_mask_get() argument
123 if (res & (MT_SPM_DRAM_S0 | MT_SPM_DRAM_S1 | MT_SPM_EMI)) in spm_hwcg_mask_get()
125 else if (res & MT_SPM_SYSPLL) in spm_hwcg_mask_get()
127 else if (res & MT_SPM_INFRA) in spm_hwcg_mask_get()
129 else if (res & MT_SPM_PMIC) in spm_hwcg_mask_get()
131 else if (res & MT_SPM_26M) in spm_hwcg_mask_get()
133 else if (res & MT_SPM_VCORE) in spm_hwcg_mask_get()
151 static uint32_t spm_hwcg_get_default(uint32_t res, enum spm_hwcg_setting type) in spm_hwcg_get_default() argument
155 if (res & (MT_SPM_DRAM_S0 | MT_SPM_DRAM_S1 | MT_SPM_EMI)) in spm_hwcg_get_default()
157 else if (res & MT_SPM_SYSPLL) in spm_hwcg_get_default()
159 else if (res & MT_SPM_INFRA) in spm_hwcg_get_default()
161 else if (res & MT_SPM_PMIC) in spm_hwcg_get_default()
163 else if (res & MT_SPM_26M) in spm_hwcg_get_default()
165 else if (res & MT_SPM_VCORE) in spm_hwcg_get_default()
193 int spm_hwcg_get_setting(uint32_t res, enum spm_hwcg_sta_type sta_type, in spm_hwcg_get_setting() argument
204 sta->sta = spm_hwcg_get_default(res, type); in spm_hwcg_get_setting()
207 sta->sta = spm_hwcg_mask_get(res, type); in spm_hwcg_get_setting()
222 uint32_t res = spm_hwcg_index2res(idx); in spm_hwcg_get_setting_by_index() local
224 return spm_hwcg_get_setting(res, sta_type, type, sta); in spm_hwcg_get_setting_by_index()
414 static uint32_t spm_peri_req_get_default(uint32_t res) in spm_peri_req_get_default() argument
418 if (res & MT_SPM_DRAM_S1) in spm_peri_req_get_default()
420 else if (res & MT_SPM_EMI) in spm_peri_req_get_default()
422 else if (res & MT_SPM_DRAM_S0) in spm_peri_req_get_default()
424 else if (res & MT_SPM_SYSPLL) in spm_peri_req_get_default()
426 else if (res & MT_SPM_INFRA) in spm_peri_req_get_default()
428 else if (res & (MT_SPM_PMIC | MT_SPM_26M | MT_SPM_VCORE)) in spm_peri_req_get_default()
436 static uint32_t spm_peri_req_mask_get(uint32_t res) in spm_peri_req_mask_get() argument
441 if (res & MT_SPM_DRAM_S1) in spm_peri_req_mask_get()
443 else if (res & MT_SPM_EMI) in spm_peri_req_mask_get()
445 else if (res & MT_SPM_DRAM_S0) in spm_peri_req_mask_get()
447 else if (res & MT_SPM_SYSPLL) in spm_peri_req_mask_get()
449 else if (res & MT_SPM_INFRA) in spm_peri_req_mask_get()
451 else if (res & (MT_SPM_PMIC | MT_SPM_26M | MT_SPM_VCORE)) in spm_peri_req_mask_get()
466 int spm_peri_req_get_setting(uint32_t res, in spm_peri_req_get_setting() argument
477 sta->sta = spm_peri_req_get_default(res); in spm_peri_req_get_setting()
480 sta->sta = spm_peri_req_mask_get(res); in spm_peri_req_get_setting()
492 uint32_t res; in spm_peri_req_index2res() local
499 res = MT_SPM_DRAM_S1; in spm_peri_req_index2res()
502 res = MT_SPM_EMI; in spm_peri_req_index2res()
505 res = MT_SPM_DRAM_S0; in spm_peri_req_index2res()
508 res = MT_SPM_SYSPLL; in spm_peri_req_index2res()
511 res = MT_SPM_INFRA; in spm_peri_req_index2res()
514 res = (MT_SPM_PMIC | MT_SPM_26M | MT_SPM_VCORE); in spm_peri_req_index2res()
517 res = 0; in spm_peri_req_index2res()
519 return res; in spm_peri_req_index2res()
527 uint32_t res = spm_peri_req_index2res(idx); in spm_peri_req_get_setting_by_index() local
529 return spm_peri_req_get_setting(res, sta_type, sta); in spm_peri_req_get_setting_by_index()
552 void spm_peri_req_ctrl(uint32_t res, in spm_peri_req_ctrl() argument
557 if (res & MT_SPM_DRAM_S1) in spm_peri_req_ctrl()
559 else if (res & MT_SPM_EMI) in spm_peri_req_ctrl()
561 else if (res & MT_SPM_DRAM_S0) in spm_peri_req_ctrl()
563 else if (res & MT_SPM_SYSPLL) in spm_peri_req_ctrl()
565 else if (res & MT_SPM_INFRA) in spm_peri_req_ctrl()
567 else if (res & (MT_SPM_PMIC | MT_SPM_26M | MT_SPM_VCORE)) in spm_peri_req_ctrl()
579 uint32_t res = spm_peri_req_index2res(idx); in spm_peri_req_ctrl_by_index() local
581 if (res) in spm_peri_req_ctrl_by_index()
582 spm_peri_req_ctrl(res, is_set, val); in spm_peri_req_ctrl_by_index()