diff mbox

[8/8] pci: Wait 20ms before checking presence detect on PCIe

Message ID 20170605225924.11416-8-benh@kernel.crashing.org
State Accepted
Headers show

Commit Message

Benjamin Herrenschmidt June 5, 2017, 10:59 p.m. UTC
As the PHB presence logic has a debounce timer that can take
a while to settle.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 core/pci.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/core/pci.c b/core/pci.c
index 1477358..2d3c4f8 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -1641,6 +1641,11 @@  void pci_init_slots(void)
 {
 	unsigned int i;
 
+	/* Some PHBs may need that long to debounce the presence detect
+	 * after HW initialization.
+	 */
+	time_wait_ms(20);
+
 	prlog(PR_NOTICE, "PCI: Resetting PHBs...\n");
 	pci_do_jobs(pci_reset_phb);