]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: mediatek: Check if power domains can be powered on at boot time
authorNicolas Boichat <drinkcat@chromium.org>
Mon, 28 Sep 2020 03:31:35 +0000 (11:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 12:46:50 +0000 (13:46 +0100)
commitfd37413964cc11368db3f55f7bba2637db98e823
tree6f0422af20e2abffc42fd58062e2346048032a60
parent579f8b9015bd14a67f5b32245e1a30a479833d44
soc: mediatek: Check if power domains can be powered on at boot time

[ Upstream commit 4007844b05815717f522c7ea9914e24ad0ff6c79 ]

In the error case, where a power domain cannot be powered on
successfully at boot time (in mtk_register_power_domains),
pm_genpd_init would still be called with is_off=false, and the
system would later try to disable the power domain again, triggering
warnings as disabled clocks are disabled again (and other potential
issues).

Also print a warning splat in that case, as this should never
happen.

Fixes: c84e358718a66f7 ("soc: Mediatek: Add SCPSYS power domain driver")
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Link: https://lore.kernel.org/r/20200928113107.v2.1.I5e6f8c262031d0451fe7241b744f4f3111c1ce71@changeid
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/mediatek/mtk-scpsys.c