]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pmdomains: mediatek: Avoid setting RTFF's CLK_DIS before NRESTORE
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Thu, 16 Jul 2026 11:42:47 +0000 (13:42 +0200)
committerUlf Hansson <ulfh@kernel.org>
Fri, 24 Jul 2026 14:47:14 +0000 (16:47 +0200)
commitcbb0140379de69fa46526672f3003f128f0b4e2e
tree0ab9b03b2dcc275a8f7271459e416353a5967031
parenta4876f11aa1d076802676e23f8af500706e780e3
pmdomains: mediatek: Avoid setting RTFF's CLK_DIS before NRESTORE

For the PCIE_PHY (also called PEXTP_PHY) type of RTFF hardware,
there is special handling setting CLK_DIS before performing the
NRESTORE sequence for resetting the RTFF and start sequencing
from a clean state.

That special handling, though, poses an issue in case the machine
specific bootchain (bootloader in particular) ends up booting the
kernel with both PCIe MAC and PHY enabled (not just power domains)
as doing so will partially corrupt the PCIe MAC/PHY registers in
an unpredictable manner, producing either an initialization fail
in the PCI-Express drivers, or even a hard lockup!

Resolve this by simply removing the special handling: in this case
the bootchain, or remote processors, setting is getting honored by
the later check for PWR_RTFF_SAVE_FLAG presence in the RTFF ctl
register.

Fixes: 9d02c94342b3 ("pmdomain: mediatek: Add support for RTFF Hardware in MT8196/MT6991")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
drivers/pmdomain/mediatek/mtk-pm-domains.c