linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH v2] PCI: mediatek: Delay 100ms to wait power and clock to become stable
@ 2021-12-07  8:41 qizhong cheng
  2021-12-07 17:54 ` Bjorn Helgaas
  0 siblings, 1 reply; 8+ messages in thread
From: qizhong cheng @ 2021-12-07  8:41 UTC (permalink / raw)
  To: Ryder Lee, Jianjun Wang, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas
  Cc: linux-pci, linux-mediatek, linux-kernel, linux-arm-kernel,
	qizhong.cheng, chuanjia.liu, Pali Rohár

Described in PCIe CEM specification sections 2.2 (PERST# Signal) and
2.2.1 (Initial Power-Up (G3 to S0)). The deassertion of PERST# should
be delayed 100ms (TPVPERL) for the power and clock to become stable.

Signed-off-by: qizhong cheng <qizhong.cheng@mediatek.com>
Acked-by: Pali Rohár <pali@kernel.org>
---

v2:
 - Typo fix.
 - Rewrap into one paragraph.

 drivers/pci/controller/pcie-mediatek.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index 2f3f974977a3..a61ea3940471 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -702,6 +702,13 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
 	 */
 	writel(PCIE_LINKDOWN_RST_EN, port->base + PCIE_RST_CTRL);
 
+	/*
+	 * Described in PCIe CEM specification sections 2.2 (PERST# Signal) and
+	 * 2.2.1 (Initial Power-Up (G3 to S0)). The deassertion of PERST# should
+	 * be delayed 100ms (TPVPERL) for the power and clock to become stable.
+	 */
+	msleep(100);
+
 	/* De-assert PHY, PE, PIPE, MAC and configuration reset	*/
 	val = readl(port->base + PCIE_RST_CTRL);
 	val |= PCIE_PHY_RSTB | PCIE_PERSTB | PCIE_PIPE_SRSTB |
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-09 15:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07  8:41 [RESEND PATCH v2] PCI: mediatek: Delay 100ms to wait power and clock to become stable qizhong cheng
2021-12-07 17:54 ` Bjorn Helgaas
2021-12-07 18:01   ` Lorenzo Pieralisi
2021-12-07 21:00   ` Mark Kettenis
2021-12-08  4:12     ` Bjorn Helgaas
     [not found]       ` <e891bf625b00078c476cc53c4b8770dfce71ddb0.camel@mediatek.com>
2021-12-08 10:18         ` Pali Rohár
     [not found]           ` <6e6fd0b50699616e7d943ec1c8bc4e71abd85f6f.camel@mediatek.com>
2021-12-09 13:00             ` Pali Rohár
2021-12-09 15:59               ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).