zynqmp: PM: Migrate to new shutdown interface

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
This commit is contained in:
Soren Brinkmann 2016-09-02 09:50:54 -07:00
parent 46cb684f32
commit 8353170321
5 changed files with 19 additions and 6 deletions

View File

@ -270,7 +270,8 @@ static void __dead2 zynqmp_system_off(void)
plat_arm_interconnect_exit_coherency();
/* Send the power down request to the PMU */
pm_system_shutdown(0);
pm_system_shutdown(PMF_SHUTDOWN_TYPE_SHUTDOWN,
PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM);
while (1)
wfi();
@ -304,7 +305,8 @@ static void __dead2 zynqmp_system_reset(void)
plat_arm_interconnect_exit_coherency();
/* Send the system reset request to the PMU */
pm_system_shutdown(1);
pm_system_shutdown(PMF_SHUTDOWN_TYPE_RESET,
PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM);
while (1)
wfi();

View File

@ -243,11 +243,11 @@ enum pm_ret_status pm_set_wakeup_source(enum pm_node_id target,
*
* @return Returns status, either success or error+reason
*/
enum pm_ret_status pm_system_shutdown(unsigned int restart)
enum pm_ret_status pm_system_shutdown(unsigned int type, unsigned int subtype)
{
uint32_t payload[PAYLOAD_ARG_CNT];
PM_PACK_PAYLOAD2(payload, PM_SYSTEM_SHUTDOWN, restart);
PM_PACK_PAYLOAD3(payload, PM_SYSTEM_SHUTDOWN, type, subtype);
return pm_ipi_send(primary_proc, payload);
}

View File

@ -61,7 +61,7 @@ enum pm_ret_status pm_set_wakeup_source(enum pm_node_id target,
enum pm_node_id wkup_node,
unsigned int enable);
enum pm_ret_status pm_system_shutdown(unsigned int restart);
enum pm_ret_status pm_system_shutdown(unsigned int type, unsigned int subtype);
enum pm_ret_status pm_init_suspend_cb(enum pm_suspend_reason reason,
unsigned int latency,

View File

@ -225,4 +225,15 @@ enum pm_boot_status {
PM_BOOT_ERROR,
};
enum pm_shutdown_type {
PMF_SHUTDOWN_TYPE_SHUTDOWN,
PMF_SHUTDOWN_TYPE_RESET,
};
enum pm_shutdown_subtype {
PMF_SHUTDOWN_SUBTYPE_SUBSYSTEM,
PMF_SHUTDOWN_SUBTYPE_PS_ONLY,
PMF_SHUTDOWN_SUBTYPE_SYSTEM,
};
#endif /* _PM_DEFS_H_ */

View File

@ -152,7 +152,7 @@ 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_SYSTEM_SHUTDOWN:
ret = pm_system_shutdown(pm_arg[0]);
ret = pm_system_shutdown(pm_arg[0], pm_arg[1]);
SMC_RET1(handle, (uint64_t)ret);
case PM_REQ_NODE: