soc: mtk-pm-domains: do not register smi node as syscon
authorHsin-Yi Wang <hsinyi@chromium.org>
Tue, 1 Jun 2021 03:59:04 +0000 (11:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:02:24 +0000 (16:02 +0200)
commitace0c0fbb39a4bd6a781ef957fccbf0bf989dfc4
treef880b3b40aa7909a415988d906cb825f11017b06
parentd50892c215646bd8185bbd71de9ed774a7bdea75
soc: mtk-pm-domains: do not register smi node as syscon

[ Upstream commit eed6ff1bb2da65067d928f4ab322c7d75f944fa4 ]

Mediatek requires mmsys clocks to be unprepared during suspend,
otherwise system has chances to hang.

syscon_regmap_lookup_by_phandle_optional() will attach and prepare the
first clock in smi node, leading to additional prepare to the clock
which is not balanced with the prepare/unprepare pair in resume/suspend
callbacks.

If a power domain node requests an smi node and the smi node's first
clock is an mmsys clock, it will results in an unstable suspend resume.

Fixes: f414854c8843 ("soc: mediatek: pm-domains: Add SMI block as bus protection block")
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: chun-jie.chen <chun-jie.chen@mediatek.com>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20210601035905.2970384-2-hsinyi@chromium.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/mediatek/mtk-pm-domains.c