cavs: pm: fix wrong usage of poll_for_register_delay

In current kernel logs the CTX_SAVE IPC will always take more than 10ms,
but before 0b2876b279 it only need less than 1ms. This patch fix the
wrong usage of always timeout for poll_for_register_delay.

IPC_DIPCIDR_MSG_MASK is the mask for msg from BIT 0 to 30 while
we want to check if BIT 31 is 0. now change the MASK and VAL to correct
values to make the poll and delay will return when there is no DSP sent
IPC.

fixes commit 0b2876b279 ("cavs: pm: poll for IPC_DIPCIDR_BUSY to be
clear before powerdown hpsram")

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit is contained in:
Pan Xiuli 2021-01-28 07:36:32 +00:00 committed by Liam Girdwood
parent 37292a70be
commit 882ef66c68
1 changed files with 1 additions and 1 deletions

View File

@ -614,7 +614,7 @@ void platform_pm_runtime_power_off(void)
/* check if DSP is busy sending IPC for 10ms */ /* check if DSP is busy sending IPC for 10ms */
ret = poll_for_register_delay(IPC_HOST_BASE + IPC_DIPCIDR, ret = poll_for_register_delay(IPC_HOST_BASE + IPC_DIPCIDR,
IPC_DIPCIDR_MSG_MASK, ~IPC_DIPCIDR_BUSY, IPC_DIPCIDR_BUSY, 0,
10000); 10000);
/* did command succeed */ /* did command succeed */
if (ret < 0) if (ret < 0)