Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Christian Marangi and committed by
Manivannan Sadhasivam
2d58bc77 04305367

+1 -6
+1 -6
drivers/pci/controller/pcie-mediatek.c
··· 697 697 */ 698 698 writel(PCIE_LINKDOWN_RST_EN, port->base + PCIE_RST_CTRL); 699 699 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); 706 701 707 702 /* De-assert PHY, PE, PIPE, MAC and configuration reset */ 708 703 val = readl(port->base + PCIE_RST_CTRL);