linux/drivers/soc/mediatek
Eugen Hristev 475426ad1a pmdomain: mediatek: fix race conditions with genpd
[ Upstream commit c41336f4d6 ]

If the power domains are registered first with genpd and *after that*
the driver attempts to power them on in the probe sequence, then it is
possible that a race condition occurs if genpd tries to power them on
in the same time.
The same is valid for powering them off before unregistering them
from genpd.
Attempt to fix race conditions by first removing the domains from genpd
and *after that* powering down domains.
Also first power up the domains and *after that* register them
to genpd.

Fixes: 59b644b01c ("soc: mediatek: Add MediaTek SCPSYS power domains")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231225133615.78993-1-eugen.hristev@collabora.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-03-01 13:21:47 +01:00
..
Kconfig soc: mediatek: mmsys: Specify HAS_IOMEM dependency for MTK_MMSYS 2020-12-10 15:33:56 +01:00
Makefile soc / drm: mediatek: Move mtk mutex driver to soc folder 2021-02-04 22:55:46 +08:00
mt8167-mmsys.h soc: mediatek: mmsys: Add support for MT8167 SoC 2021-04-06 12:57:10 +02:00
mt8167-pm-domains.h soc: mediatek: pm-domains: Add a power domain names for mt8167 2021-04-01 11:36:04 +02:00
mt8173-pm-domains.h soc: mediatek: pm-domains: Add domain_supply cap for mfg_async PD 2021-07-12 12:26:29 +02:00
mt8183-mmsys.h soc: mmsys: mediatek: add mask to mmsys routes 2021-08-04 19:05:46 +02:00
mt8183-pm-domains.h soc: mediatek: pm-domains: Add a power domain names for mt8183 2021-04-01 11:36:04 +02:00
mt8192-pm-domains.h soc: mediatek: pm-domains: Add a power domain names for mt8192 2021-04-01 11:36:04 +02:00
mt8365-mmsys.h soc: mediatek: mmsys: add MT8365 support 2021-08-06 16:43:23 +02:00
mtk-cmdq-helper.c soc: mediatek: cmdq: Remove cmdq_pkt_flush() 2021-01-31 12:35:46 +01:00
mtk-devapc.c soc: mediatek: add missing MODULE_DEVICE_TABLE 2021-05-12 18:29:37 +02:00
mtk-infracfg.c soc: mediatek: pm_domains: Make bus protection generic 2020-11-27 12:04:42 +01:00
mtk-mmsys.c soc: mediatek: mmsys: add MT8365 support 2021-08-06 16:43:23 +02:00
mtk-mmsys.h soc: mediatek: mmsys: Fix missing UFOE component in mt8173 table routing 2021-08-06 16:43:23 +02:00
mtk-mutex.c soc: mediatek: Make symbol 'mtk_mutex_driver' static 2021-04-01 11:27:54 +02:00
mtk-pm-domains.c pmdomain: mediatek: fix race conditions with genpd 2024-03-01 13:21:47 +01:00
mtk-pm-domains.h soc: mediatek: pm-domains: Use correct mask for bus_prot_clr 2021-07-12 12:26:28 +02:00
mtk-pmic-wrap.c soc: mediatek: pwrap: add pwrap driver for MT8195 SoC 2021-06-03 19:41:26 +02:00
mtk-scpsys.c Revert "ASoC: mediatek: Check for error clk pointer" 2022-02-08 18:34:06 +01:00