ti: k3: common: Use shutdown API for PSCI core poweroff

To ensure WFI is reached before the PSC is trigger to power-down
a processor, the shutdonw API must be used.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
This commit is contained in:
Andrew F. Davis 2019-01-03 13:24:25 -06:00
parent 72f418e05f
commit ca3d3414a8
1 changed files with 3 additions and 2 deletions

View File

@ -81,15 +81,16 @@ static int k3_pwr_domain_on(u_register_t mpidr)
void k3_pwr_domain_off(const psci_power_state_t *target_state)
{
int core_id, device, ret;
int core_id, proc, device, ret;
/* Prevent interrupts from spuriously waking up this cpu */
k3_gic_cpuif_disable();
core_id = plat_my_core_pos();
proc = PLAT_PROC_START_ID + core_id;
device = PLAT_PROC_DEVICE_START_ID + core_id;
ret = ti_sci_device_put(device);
ret = ti_sci_proc_shutdown(proc, device);
if (ret) {
ERROR("Request to stop core failed: %d\n", ret);
return;