zynqmp: pm: Implemented 'get_op_characteristic' PM API call
Signed-off-by: Anes Hadziahmetagic <anes.hadziahmetagic@aggios.com> Signed-off-by: Filip Drazic <filip.drazic@aggios.com> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
This commit is contained in:
parent
df4c59c5d2
commit
493541d640
|
@ -395,17 +395,25 @@ enum pm_ret_status pm_register_notifier(enum pm_node_id nid,
|
|||
}
|
||||
|
||||
/**
|
||||
* pm_get_op_characteristic() - PM call to get a particular operating
|
||||
* characteristic of a node
|
||||
* @nid Node ID
|
||||
* @type Operating characterstic type to be returned
|
||||
* pm_get_op_characteristic() - PM call to request operating characteristics
|
||||
* of a node
|
||||
* @nid Node id of the slave
|
||||
* @type Type of the operating characteristic
|
||||
* (power, temperature and latency)
|
||||
* @result Returns the operating characteristic for the requested node,
|
||||
* specified by the type
|
||||
*
|
||||
* @return Returns status, either success or error+reason
|
||||
*/
|
||||
enum pm_ret_status pm_get_op_characteristic(enum pm_node_id nid,
|
||||
enum pm_opchar_type type)
|
||||
enum pm_opchar_type type,
|
||||
uint32_t *result)
|
||||
{
|
||||
return PM_RET_ERROR_NOTSUPPORTED;
|
||||
uint32_t payload[PAYLOAD_ARG_CNT];
|
||||
|
||||
/* Send request to the PMU */
|
||||
PM_PACK_PAYLOAD3(payload, PM_GET_OP_CHARACTERISTIC, nid, type);
|
||||
return pm_ipi_send_sync(primary_proc, payload, result);
|
||||
}
|
||||
|
||||
/* Direct-Control API functions */
|
||||
|
|
|
@ -91,7 +91,8 @@ enum pm_ret_status pm_register_notifier(enum pm_node_id nid,
|
|||
unsigned int wake,
|
||||
unsigned int enable);
|
||||
enum pm_ret_status pm_get_op_characteristic(enum pm_node_id nid,
|
||||
enum pm_opchar_type type);
|
||||
enum pm_opchar_type type,
|
||||
uint32_t *result);
|
||||
enum pm_ret_status pm_acknowledge_cb(enum pm_node_id nid,
|
||||
enum pm_ret_status status,
|
||||
unsigned int oppoint);
|
||||
|
|
|
@ -171,8 +171,8 @@ enum pm_ram_state {
|
|||
|
||||
enum pm_opchar_type {
|
||||
PM_OPCHAR_TYPE_POWER = 1,
|
||||
PM_OPCHAR_TYPE_ENERGY,
|
||||
PM_OPCHAR_TYPE_TEMP,
|
||||
PM_OPCHAR_TYPE_LATENCY,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -191,8 +191,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);
|
||||
|
||||
case PM_GET_OP_CHARACTERISTIC:
|
||||
ret = pm_get_op_characteristic(pm_arg[0], pm_arg[1]);
|
||||
SMC_RET1(handle, (uint64_t)ret);
|
||||
{
|
||||
uint32_t result;
|
||||
|
||||
ret = pm_get_op_characteristic(pm_arg[0], pm_arg[1], &result);
|
||||
SMC_RET1(handle, (uint64_t)ret | ((uint64_t)result << 32));
|
||||
}
|
||||
|
||||
case PM_REGISTER_NOTIFIER:
|
||||
ret = pm_register_notifier(pm_arg[0], pm_arg[1], pm_arg[2],
|
||||
|
|
Loading…
Reference in New Issue