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:
@@ -1644,7 +1644,12 @@ void pci_init_slots(void)
/* Some PHBs may need that long to debounce the presence detect
* after HW initialization.
*/
+ 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);
