Skip to content

Commit 2d58bc7

Browse files
AnsuelMani-Sadhasivam
authored andcommitted
PCI: mediatek: Use generic MACRO for TPVPERL delay
Use the generic PCI MACRO for TPVPERL delay to wait for clock and power stabilization after PERST# Signal instead of the raw value of 100 ms. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20251020111121.31779-5-ansuelsmth@gmail.com
1 parent 0430536 commit 2d58bc7

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/pci/controller/pcie-mediatek.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -697,12 +697,7 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
697697
*/
698698
writel(PCIE_LINKDOWN_RST_EN, port->base + PCIE_RST_CTRL);
699699

700-
/*
701-
* Described in PCIe CEM specification sections 2.2 (PERST# Signal) and
702-
* 2.2.1 (Initial Power-Up (G3 to S0)). The deassertion of PERST# should
703-
* be delayed 100ms (TPVPERL) for the power and clock to become stable.
704-
*/
705-
msleep(100);
700+
msleep(PCIE_T_PVPERL_MS);
706701

707702
/* De-assert PHY, PE, PIPE, MAC and configuration reset */
708703
val = readl(port->base + PCIE_RST_CTRL);

0 commit comments

Comments
 (0)