]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: mediatek-gen3: Implement sys clock ready time setting
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Thu, 3 Jul 2025 12:08:45 +0000 (14:08 +0200)
committerManivannan Sadhasivam <mani@kernel.org>
Tue, 19 Aug 2025 14:35:51 +0000 (20:05 +0530)
commita895dc47ceba63feb711905440585cf2b16e9ce2
treef953fc7a73b9429d429dd89f2c744f68d0299394
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
PCI: mediatek-gen3: Implement sys clock ready time setting

In preparation to add support for the PCI-Express Gen3 controller
found in newer MediaTek SoCs, such as the Dimensity 9400 MT6991
and the MT8196 Chromebook SoC, add the definition for the PCIE
Resource Control register and a new sys_clk_rdy_time_us variable
in platform data.

If sys_clk_rdy_time_us is found (> 0), set the new value in the
aforementioned register only after configuring the controller to
RC mode, as this may otherwise be reset.

Overriding the register defaults for SYS_CLK_RDY_TIME allows to
work around sys_clk_rdy signal glitching in MT6991 and MT8196.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
[mani: used FIELD_MODIFY() to simplify mask and update]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20250703120847.121826-2-angelogioacchino.delregno@collabora.com
drivers/pci/controller/pcie-mediatek-gen3.c