Lines Matching refs:pcc_ss_data

204 	struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id];  in check_pcc_chan()  local
206 pcc_ss_data->pcc_comm_addr; in check_pcc_chan()
208 if (!pcc_ss_data->platform_owns_pcc) in check_pcc_chan()
217 pcc_ss_data->deadline_us); in check_pcc_chan()
220 pcc_ss_data->platform_owns_pcc = false; in check_pcc_chan()
239 struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; in send_pcc_cmd() local
241 pcc_ss_data->pcc_comm_addr; in send_pcc_cmd()
254 if (pcc_ss_data->pending_pcc_write_cmd) in send_pcc_cmd()
261 pcc_ss_data->pending_pcc_write_cmd = FALSE; in send_pcc_cmd()
268 if (pcc_ss_data->pcc_mrtt) { in send_pcc_cmd()
270 pcc_ss_data->last_cmd_cmpl_time); in send_pcc_cmd()
271 if (pcc_ss_data->pcc_mrtt > time_delta) in send_pcc_cmd()
272 udelay(pcc_ss_data->pcc_mrtt - time_delta); in send_pcc_cmd()
286 if (pcc_ss_data->pcc_mpar) { in send_pcc_cmd()
287 if (pcc_ss_data->mpar_count == 0) { in send_pcc_cmd()
289 pcc_ss_data->last_mpar_reset); in send_pcc_cmd()
290 if ((time_delta < 60 * MSEC_PER_SEC) && pcc_ss_data->last_mpar_reset) { in send_pcc_cmd()
296 pcc_ss_data->last_mpar_reset = ktime_get(); in send_pcc_cmd()
297 pcc_ss_data->mpar_count = pcc_ss_data->pcc_mpar; in send_pcc_cmd()
299 pcc_ss_data->mpar_count--; in send_pcc_cmd()
308 pcc_ss_data->platform_owns_pcc = true; in send_pcc_cmd()
311 ret = mbox_send_message(pcc_ss_data->pcc_channel->mchan, &cmd); in send_pcc_cmd()
321 if (pcc_ss_data->pcc_mrtt) in send_pcc_cmd()
322 pcc_ss_data->last_cmd_cmpl_time = ktime_get(); in send_pcc_cmd()
324 if (pcc_ss_data->pcc_channel->mchan->mbox->txdone_irq) in send_pcc_cmd()
325 mbox_chan_txdone(pcc_ss_data->pcc_channel->mchan, ret); in send_pcc_cmd()
327 mbox_client_txdone(pcc_ss_data->pcc_channel->mchan, ret); in send_pcc_cmd()
338 if (desc->write_cmd_id == pcc_ss_data->pcc_write_cnt) in send_pcc_cmd()
342 pcc_ss_data->pcc_write_cnt++; in send_pcc_cmd()
343 wake_up_all(&pcc_ss_data->pcc_write_wait_q); in send_pcc_cmd()
1107 struct cppc_pcc_data *pcc_ss_data = NULL; in cppc_get_perf() local
1113 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_perf()
1115 down_write(&pcc_ss_data->pcc_lock); in cppc_get_perf()
1122 up_write(&pcc_ss_data->pcc_lock); in cppc_get_perf()
1185 struct cppc_pcc_data *pcc_ss_data = NULL; in cppc_get_perf_caps() local
1209 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_perf_caps()
1211 down_write(&pcc_ss_data->pcc_lock); in cppc_get_perf_caps()
1255 up_write(&pcc_ss_data->pcc_lock); in cppc_get_perf_caps()
1315 struct cppc_pcc_data *pcc_ss_data = NULL; in cppc_get_perf_ctrs() local
1343 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_perf_ctrs()
1344 down_write(&pcc_ss_data->pcc_lock); in cppc_get_perf_ctrs()
1377 up_write(&pcc_ss_data->pcc_lock); in cppc_get_perf_ctrs()
1392 struct cppc_pcc_data *pcc_ss_data = NULL; in cppc_set_epp_perf() local
1421 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_set_epp_perf()
1423 down_write(&pcc_ss_data->pcc_lock); in cppc_set_epp_perf()
1426 up_write(&pcc_ss_data->pcc_lock); in cppc_set_epp_perf()
1459 struct cppc_pcc_data *pcc_ss_data = NULL; in cppc_get_auto_sel_caps() local
1465 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_auto_sel_caps()
1467 down_write(&pcc_ss_data->pcc_lock); in cppc_get_auto_sel_caps()
1476 up_write(&pcc_ss_data->pcc_lock); in cppc_get_auto_sel_caps()
1495 struct cppc_pcc_data *pcc_ss_data = NULL; in cppc_set_auto_sel() local
1517 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_set_auto_sel()
1519 down_write(&pcc_ss_data->pcc_lock); in cppc_set_auto_sel()
1522 up_write(&pcc_ss_data->pcc_lock); in cppc_set_auto_sel()
1545 struct cppc_pcc_data *pcc_ss_data = NULL; in cppc_set_enable() local
1564 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_set_enable()
1566 down_write(&pcc_ss_data->pcc_lock); in cppc_set_enable()
1569 up_write(&pcc_ss_data->pcc_lock); in cppc_set_enable()
1589 struct cppc_pcc_data *pcc_ss_data = NULL; in cppc_set_perf() local
1613 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_set_perf()
1614 down_read(&pcc_ss_data->pcc_lock); /* BEGIN Phase-I */ in cppc_set_perf()
1615 if (pcc_ss_data->platform_owns_pcc) { in cppc_set_perf()
1618 up_read(&pcc_ss_data->pcc_lock); in cppc_set_perf()
1626 pcc_ss_data->pending_pcc_write_cmd = true; in cppc_set_perf()
1627 cpc_desc->write_cmd_id = pcc_ss_data->pcc_write_cnt; in cppc_set_perf()
1644 up_read(&pcc_ss_data->pcc_lock); /* END Phase-I */ in cppc_set_perf()
1692 if (down_write_trylock(&pcc_ss_data->pcc_lock)) {/* BEGIN Phase-II */ in cppc_set_perf()
1694 if (pcc_ss_data->pending_pcc_write_cmd) in cppc_set_perf()
1696 up_write(&pcc_ss_data->pcc_lock); /* END Phase-II */ in cppc_set_perf()
1699 wait_event(pcc_ss_data->pcc_write_wait_q, in cppc_set_perf()
1700 cpc_desc->write_cmd_id != pcc_ss_data->pcc_write_cnt); in cppc_set_perf()
1738 struct cppc_pcc_data *pcc_ss_data; in cppc_get_transition_latency() local
1753 pcc_ss_data = pcc_data[pcc_ss_id]; in cppc_get_transition_latency()
1754 if (pcc_ss_data->pcc_mpar) in cppc_get_transition_latency()
1755 latency_ns = 60 * (1000 * 1000 * 1000 / pcc_ss_data->pcc_mpar); in cppc_get_transition_latency()
1757 latency_ns = max(latency_ns, pcc_ss_data->pcc_nominal * 1000); in cppc_get_transition_latency()
1758 latency_ns = max(latency_ns, pcc_ss_data->pcc_mrtt * 1000); in cppc_get_transition_latency()