]> www.infradead.org Git - users/dwmw2/linux.git/commit
mailbox: imx: Add context save/restore for suspend/resume
authorDong Aisheng <aisheng.dong@nxp.com>
Wed, 3 Jun 2020 05:15:42 +0000 (13:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:07 +0000 (17:49 +0200)
commit1af0bc2c1c9957603cac10320782e40b028b44d8
tree309f9cdfef6421d25f902bdd0493c6d2b0072b07
parent441b31b1bab8053a7c5067ad67c5a97b29ecbf03
mailbox: imx: Add context save/restore for suspend/resume

[ Upstream commit ba5f9fa0ca85a6137fa35efd3a1256d8bb6bc5ff ]

For "mem" mode suspend on i.MX8 SoCs, MU settings could be
lost because its power is off, so save/restore is needed
for MU settings during suspend/resume. However, the restore
can ONLY be done when MU settings are actually lost, for the
scenario of settings NOT lost in "freeze" mode suspend, since
there could be still IPC going on multiple CPUs, restoring the
MU settings could overwrite the TIE by mistake and cause system
freeze, so need to make sure ONLY restore the MU settings when
it is powered off, Anson fixes this by checking whether restore
is actually needed when resume.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mailbox/imx-mailbox.c