diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-07 17:11:45 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-07 17:11:45 +1000 |
commit | 9253de5bcab2800c1ac1f5372ba5354543fa2e67 (patch) | |
tree | d6a821504d31c49eab14ee14caca42bc6fe36cb8 /core/pci.c | |
parent | 8552222ce46501ed7684ef26dd9fcca470aa5e6c (diff) | |
download | skiboot-9253de5bcab2800c1ac1f5372ba5354543fa2e67.zip skiboot-9253de5bcab2800c1ac1f5372ba5354543fa2e67.tar.gz skiboot-9253de5bcab2800c1ac1f5372ba5354543fa2e67.tar.bz2 |
PCI: only wait 20ms for PHB logic to settle if we detected any PHBs
Otherwise, in simulators such as Mambo, we needlessly wait 20ms, which
takes much longer than 20ms to do, because simulator.
Fixes: 41b14f9452c25f3dd74a8304763a3cc58bff019f
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci.c')
-rw-r--r-- | core/pci.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1644,7 +1644,12 @@ void pci_init_slots(void) /* Some PHBs may need that long to debounce the presence detect * after HW initialization. */ - time_wait_ms(20); + for (i = 0; i < ARRAY_SIZE(phbs); i++) { + if (phbs[i]) { + time_wait_ms(20); + break; + } + } prlog(PR_NOTICE, "PCI: Resetting PHBs...\n"); pci_do_jobs(pci_reset_phb); |