pm: send IPC on PM power off completion.

Send command completion IPC after powedown completes instead of before
power off completes. This allows host to know that DSP is in OFF state
prior to driver PM actions.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2018-12-20 14:00:58 +00:00 committed by Liam Girdwood
parent db88ab49e4
commit af6fcdd5ee
2 changed files with 16 additions and 8 deletions

View File

@ -133,18 +133,17 @@ void ipc_platform_do_cmd(struct ipc *ipc)
done:
ipc->host_pending = 0;
/* are we about to enter D3 ? */
if (iipc->pm_prepare_D3) {
/* no return - memory will be powered off and IPC sent */
platform_pm_runtime_power_off();
}
/* write 1 to clear busy, and trigger interrupt to host*/
ipc_write(IPC_DIPCT, ipc_read(IPC_DIPCT) | IPC_DIPCT_BUSY);
/* unmask Busy interrupt */
ipc_write(IPC_DIPCCTL, ipc_read(IPC_DIPCCTL) | IPC_DIPCCTL_IPCTBIE);
// TODO: signal audio work to enter D3 in normal context
/* are we about to enter D3 ? */
if (iipc->pm_prepare_D3) {
/* no return - memory will be powered off */
platform_pm_runtime_power_off();
}
}
void ipc_platform_send_msg(struct ipc *ipc)

View File

@ -146,6 +146,15 @@ _PD_RELEASE_VNN:
//TODO: add sending IPC reply from L1$ locked code
_PD_SEND_IPC:
// Send IPC to host informing of PD completion - Clear BUSY bit by
// writting IPC_DIPCT_BUSY to IPC_DIPCT
movi temp_reg0, IPC_HOST_BASE
l32i temp_reg1, temp_reg0, IPC_DIPCT
movi temp_reg2, IPC_DIPCT_BUSY
or temp_reg1, temp_reg1, temp_reg2
s32i temp_reg1, temp_reg0, IPC_DIPCT
_PD_SLEEP:
// effecfively executes:
// xmp_spin()