]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: Add T_PERST_CLK_US macro
authorThomas Richard <thomas.richard@bootlin.com>
Wed, 19 Jun 2024 10:15:13 +0000 (12:15 +0200)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Wed, 4 Sep 2024 14:09:29 +0000 (14:09 +0000)
The "Power Sequencing and Reset Signal Timings" table of the PCI
Express Card Electromechanical Specification, Revision 5.1, Section
2.9.2, indicates PERST# should be deasserted after minimum of 100us
once REFCLK is stable (symbol T_PERST-CLK).

Add a macro so that PCIe controller drivers can use it.

Link: https://lore.kernel.org/linux-pci/20240102-j7200-pcie-s2r-v7-5-a2f9156da6c3@bootlin.com
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
[kwilczynski: commit log, update sleep interval macros code comments]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
drivers/pci/pci.h

index 79c8398f39384c75e9851dadf8f4caaec5a0fc2e..abfe0b3d5f1e63287432e77f9263264a75dbb6bd 100644 (file)
 
 #define PCIE_LINK_RETRAIN_TIMEOUT_MS   1000
 
-/* Power stable to PERST# inactive from PCIe card Electromechanical Spec */
+/*
+ * Power stable to PERST# inactive.
+ *
+ * See the "Power Sequencing and Reset Signal Timings" table of the PCI Express
+ * Card Electromechanical Specification, Revision 5.1, Section 2.9.2, Symbol
+ * "T_PVPERL".
+ */
 #define PCIE_T_PVPERL_MS               100
 
+/*
+ * REFCLK stable before PERST# inactive.
+ *
+ * See the "Power Sequencing and Reset Signal Timings" table of the PCI Express
+ * Card Electromechanical Specification, Revision 5.1, Section 2.9.2, Symbol
+ * "T_PERST-CLK".
+ */
+#define PCIE_T_PERST_CLK_US            100
+
 /*
  * End of conventional reset (PERST# de-asserted) to first configuration
  * request (device able to respond with a "Request Retry Status" completion),