]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: imx: Add runtime PM callback to handle MU clocks
authorAnson Huang <Anson.Huang@nxp.com>
Wed, 3 Jun 2020 05:15:43 +0000 (13:15 +0800)
committerJassi Brar <jaswinder.singh@linaro.org>
Sun, 7 Jun 2020 21:11:30 +0000 (16:11 -0500)
commit94d6373055e9f4ec47b5d6e3c945a7f651a6433b
treedcb7d66728c840a998d3e1dfcae2c12d26ff0abe
parent507771be34c2c4f6e696e3cdfa7bbde6deb10d9c
mailbox: imx: Add runtime PM callback to handle MU clocks

Some of i.MX8M SoCs have MU clock, they need to be managed in runtime
to make sure the MU clock can be off in runtime, add runtime PM callback
to handle MU clock.

And on i.MX8MP, the MU clock is combined with power domain and runtime
PM is enabled for the clock driver, during noirq suspend/resume phase,
runtime PM is disabled by device suspend, but the MU context save/restore
needs to enable MU clock for register access, calling clock prepare/enable
will trigger runtime resume failure and lead to system suspend failed.

Actually, the MU context save/restore is ONLY necessary for SCU IPC MU,
other MUs especially on i.MX8MP platforms which have MU clock assigned,
they need to runtime request/free mailbox channel in the consumer driver,
so no need to save/restore MU context for them, hence it can avoid this
issue, so the MU context save/restore is ONLY applied to i.MX platforms
MU instance without clock present.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/imx-mailbox.c