plat: versal: Add InitFinalize API call
Add support to call InitFinalize API in Versal which calls corresponding LibPM API. Signed-off-by: Ravi Patel <ravi.patel@xilinx.com> Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Change-Id: I3428b7245b4db1ef6db8a90b7ad20b6e484ed3b2
This commit is contained in:
parent
1ba2d84fe2
commit
2cc1fa9537
|
@ -84,6 +84,22 @@ enum pm_ret_status pm_get_api_version(unsigned int *version)
|
|||
return pm_ipi_send_sync(primary_proc, payload, version, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* pm_init_finalize() - Call to notify PMC PM firmware that master has power
|
||||
* management enabled and that it has finished its
|
||||
* initialization
|
||||
*
|
||||
* @return Status returned by the PMU firmware
|
||||
*/
|
||||
enum pm_ret_status pm_init_finalize(void)
|
||||
{
|
||||
uint32_t payload[PAYLOAD_ARG_CNT];
|
||||
|
||||
/* Send request to the PMU */
|
||||
PM_PACK_PAYLOAD1(payload, LIBPM_MODULE_ID, PM_INIT_FINALIZE);
|
||||
return pm_ipi_send_sync(primary_proc, payload, NULL, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* pm_self_suspend() - PM call for processor to suspend itself
|
||||
* @nid Node id of the processor or subsystem
|
||||
|
@ -800,7 +816,6 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, unsigned int *version)
|
|||
switch (api_id) {
|
||||
case PM_GET_CALLBACK_DATA:
|
||||
case PM_GET_TRUSTZONE_VERSION:
|
||||
case PM_INIT_FINALIZE:
|
||||
*version = (PM_API_BASE_VERSION << 16);
|
||||
return PM_RET_SUCCESS;
|
||||
case PM_GET_API_VERSION:
|
||||
|
@ -843,6 +858,7 @@ enum pm_ret_status pm_feature_check(uint32_t api_id, unsigned int *version)
|
|||
case PM_PLL_SET_MODE:
|
||||
case PM_PLL_GET_MODE:
|
||||
case PM_FEATURE_CHECK:
|
||||
case PM_INIT_FINALIZE:
|
||||
*version = (PM_API_BASE_VERSION << 16);
|
||||
break;
|
||||
case PM_LOAD_PDI:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019, Xilinx, Inc. All rights reserved.
|
||||
* Copyright (c) 2019-2020, Xilinx, Inc. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -15,6 +15,7 @@
|
|||
**********************************************************/
|
||||
|
||||
enum pm_ret_status pm_get_api_version(unsigned int *version);
|
||||
enum pm_ret_status pm_init_finalize(void);
|
||||
enum pm_ret_status pm_self_suspend(uint32_t nid,
|
||||
unsigned int latency,
|
||||
unsigned int state,
|
||||
|
|
|
@ -159,7 +159,8 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
|
|||
}
|
||||
|
||||
case PM_INIT_FINALIZE:
|
||||
SMC_RET1(handle, (uint64_t)PM_RET_SUCCESS);
|
||||
ret = pm_init_finalize();
|
||||
SMC_RET1(handle, (uint64_t)ret);
|
||||
|
||||
case PM_GET_CALLBACK_DATA:
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue