plat: versal: Add Get_ChipID API
Add support for Get_ChipID API in Versal which calls corresponding LibPM API. Signed-off-by: Ravi Patel <ravi.patel@xilinx.com> Acked-by: Jolly Shah <jolly.shah@xilinx.com> Signed-off-by: Jolly Shah <jolly.shah@xilinx.com> Change-Id: I25c4b301721d7989d982ac376c59195c55564022
This commit is contained in:
parent
e4c54c0d2d
commit
ea6e1c3942
|
@ -748,6 +748,23 @@ enum pm_ret_status pm_set_wakeup_source(uint32_t target, uint32_t wkup_device,
|
|||
return pm_ipi_send(primary_proc, payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* pm_get_chipid() - Read silicon ID registers
|
||||
* @value Buffer for return values. Must be large enough
|
||||
* to hold 8 bytes.
|
||||
*
|
||||
* @return Returns silicon ID registers
|
||||
*/
|
||||
enum pm_ret_status pm_get_chipid(uint32_t *value)
|
||||
{
|
||||
uint32_t payload[PAYLOAD_ARG_CNT];
|
||||
|
||||
/* Send request to the PMC */
|
||||
PM_PACK_PAYLOAD1(payload, LIBPM_MODULE_ID, PM_GET_CHIPID);
|
||||
|
||||
return pm_ipi_send_sync(primary_proc, payload, value, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* pm_feature_check() - Returns the supported API version if supported
|
||||
* @api_id API ID to check
|
||||
|
|
|
@ -65,6 +65,7 @@ enum pm_ret_status pm_api_ioctl(uint32_t device_id, uint32_t ioctl_id,
|
|||
enum pm_ret_status pm_query_data(uint32_t qid, uint32_t arg1, uint32_t arg2,
|
||||
uint32_t arg3, uint32_t *data);
|
||||
unsigned int pm_get_shutdown_scope(void);
|
||||
enum pm_ret_status pm_get_chipid(uint32_t *value);
|
||||
enum pm_ret_status pm_feature_check(uint32_t api_id, unsigned int *version);
|
||||
enum pm_ret_status pm_load_pdi(uint32_t src, uint32_t address_low,
|
||||
uint32_t address_high);
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
#define PM_RESET_ASSERT 17U
|
||||
#define PM_RESET_GET_STATUS 18U
|
||||
#define PM_INIT_FINALIZE 21U
|
||||
#define PM_GET_CHIPID 24U
|
||||
#define PM_PINCTRL_REQUEST 28U
|
||||
#define PM_PINCTRL_RELEASE 29U
|
||||
#define PM_PINCTRL_GET_FUNCTION 30U
|
||||
|
|
|
@ -290,6 +290,15 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
|
|||
SMC_RET1(handle, (uint64_t)PM_RET_SUCCESS |
|
||||
((uint64_t)VERSAL_TZ_VERSION << 32));
|
||||
|
||||
case PM_GET_CHIPID:
|
||||
{
|
||||
uint32_t result[2];
|
||||
|
||||
ret = pm_get_chipid(result);
|
||||
SMC_RET2(handle, (uint64_t)ret | ((uint64_t)result[0] << 32),
|
||||
result[1]);
|
||||
}
|
||||
|
||||
case PM_FEATURE_CHECK:
|
||||
{
|
||||
uint32_t version;
|
||||
|
|
Loading…
Reference in New Issue