plat: xilinx: versal: Add support of set max latency for the device
Add support of set max latency, to change in the maximum powerup latency requirements for a specific device currently used by Subsystem. Signed-off-by: Tejas Patel <tejas.patel@xilinx.com> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Change-Id: I8749886abb1a7884a42c4d156d89c9cd562a5b1a
This commit is contained in:
parent
2cc1fa9537
commit
07d8a5f7dc
|
@ -859,6 +859,7 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, unsigned int *version)
|
||||||
case PM_PLL_GET_MODE:
|
case PM_PLL_GET_MODE:
|
||||||
case PM_FEATURE_CHECK:
|
case PM_FEATURE_CHECK:
|
||||||
case PM_INIT_FINALIZE:
|
case PM_INIT_FINALIZE:
|
||||||
|
case PM_SET_MAX_LATENCY:
|
||||||
*version = (PM_API_BASE_VERSION << 16);
|
*version = (PM_API_BASE_VERSION << 16);
|
||||||
break;
|
break;
|
||||||
case PM_LOAD_PDI:
|
case PM_LOAD_PDI:
|
||||||
|
@ -924,3 +925,23 @@ enum pm_ret_status pm_get_op_characteristic(uint32_t device_id,
|
||||||
device_id, type);
|
device_id, type);
|
||||||
return pm_ipi_send_sync(primary_proc, payload, result, 1);
|
return pm_ipi_send_sync(primary_proc, payload, result, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pm_set_max_latency() - PM call to change in the maximum wake-up latency
|
||||||
|
* requirements for a specific device currently
|
||||||
|
* used by that CPU.
|
||||||
|
* @device_id Device ID
|
||||||
|
* @latency Latency value
|
||||||
|
*
|
||||||
|
* @return Returns status, either success or error+reason
|
||||||
|
*/
|
||||||
|
enum pm_ret_status pm_set_max_latency(uint32_t device_id, uint32_t latency)
|
||||||
|
{
|
||||||
|
uint32_t payload[PAYLOAD_ARG_CNT];
|
||||||
|
|
||||||
|
/* Send request to the PMC */
|
||||||
|
PM_PACK_PAYLOAD3(payload, LIBPM_MODULE_ID, PM_SET_MAX_LATENCY,
|
||||||
|
device_id, latency);
|
||||||
|
|
||||||
|
return pm_ipi_send_sync(primary_proc, payload, NULL, 0);
|
||||||
|
}
|
||||||
|
|
|
@ -73,4 +73,5 @@ enum pm_ret_status pm_load_pdi(uint32_t src, uint32_t address_low,
|
||||||
enum pm_ret_status pm_get_op_characteristic(uint32_t device_id,
|
enum pm_ret_status pm_get_op_characteristic(uint32_t device_id,
|
||||||
enum pm_opchar_type type,
|
enum pm_opchar_type type,
|
||||||
uint32_t *result);
|
uint32_t *result);
|
||||||
|
enum pm_ret_status pm_set_max_latency(uint32_t device_id, uint32_t latency);
|
||||||
#endif /* PM_API_SYS_H */
|
#endif /* PM_API_SYS_H */
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
#define PM_REQUEST_DEVICE 13U
|
#define PM_REQUEST_DEVICE 13U
|
||||||
#define PM_RELEASE_DEVICE 14U
|
#define PM_RELEASE_DEVICE 14U
|
||||||
#define PM_SET_REQUIREMENT 15U
|
#define PM_SET_REQUIREMENT 15U
|
||||||
|
#define PM_SET_MAX_LATENCY 16U
|
||||||
#define PM_RESET_ASSERT 17U
|
#define PM_RESET_ASSERT 17U
|
||||||
#define PM_RESET_GET_STATUS 18U
|
#define PM_RESET_GET_STATUS 18U
|
||||||
#define PM_INIT_FINALIZE 21U
|
#define PM_INIT_FINALIZE 21U
|
||||||
|
|
|
@ -323,6 +323,12 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
|
||||||
SMC_RET1(handle, (uint64_t)ret | ((uint64_t)result << 32));
|
SMC_RET1(handle, (uint64_t)ret | ((uint64_t)result << 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case PM_SET_MAX_LATENCY:
|
||||||
|
{
|
||||||
|
ret = pm_set_max_latency(pm_arg[0], pm_arg[1]);
|
||||||
|
SMC_RET1(handle, (uint64_t)ret);
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
WARN("Unimplemented PM Service Call: 0x%x\n", smc_fid);
|
WARN("Unimplemented PM Service Call: 0x%x\n", smc_fid);
|
||||||
SMC_RET1(handle, SMC_UNK);
|
SMC_RET1(handle, SMC_UNK);
|
||||||
|
|
Loading…
Reference in New Issue