[PATCH 5.10.y-cip 11/28] PCI: Move link up wait time and max retries macros to pci.h

Claudiu
2026-03-11T11:04:19Z

From: Niklas Cassel <cassel@kernel.org>

commit d7467bc72ce4e3f64062017d6c9ae3816e8a7b0e upstream.

Move the LINK_WAIT_SLEEP_MS and LINK_WAIT_MAX_RETRIES macros to pci.h.
Prefix the macros with PCIE_ in order to avoid redefining these for
drivers that already have macros named like this.

No functional changes.

Suggested-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20250625102347.1205584-15-cassel@kernel.org
[claudiu.beznea:
- dropped changes to pcie-designware as the CIP v5.10 uses usleep_range()
while the original commit uses msleep()
- fixed conflict in pci.h by keeping only the PCIE_LINK_WAIT_MAX_RETRIES
and PCIE_LINK_WAIT_SLEEP_MS macros]
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---
drivers/pci/pci.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 9001851a8ad7..0ddc1e37a796 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -26,6 +26,10 @@
*/
#define PCIE_RESET_CONFIG_WAIT_MS 100

+/* Parameters for the waiting for link up routine */
+#define PCIE_LINK_WAIT_MAX_RETRIES 10
+#define PCIE_LINK_WAIT_SLEEP_MS 90
+
extern const unsigned char pcie_link_speed[];
extern bool pci_early_dump;

--
2.43.0