Hi,

attached patch fixes boot on my bcm5785-based board with low loglevels.
I guess without some serial text early on (which is slow), the devices
aren't readily available, and so things go wrong and finally hang on the
last write operation in the modified function.

I opted against a timeout + error, as there's no useful alternative
action to do on error. An error message to notify the developer that
something is going wrong, to simplify debugging after so-and-so many
iterations might still be useful - but what's the right number? :-)


Signed-off-by: Patrick Georgi <[email protected]>
Index: src/southbridge/broadcom/bcm5785/bcm5785_early_setup.c
===================================================================
--- src/southbridge/broadcom/bcm5785/bcm5785_early_setup.c      (Revision 5990)
+++ src/southbridge/broadcom/bcm5785/bcm5785_early_setup.c      (Arbeitskopie)
@@ -47,7 +47,7 @@
         uint32_t dword;
         uint32_t dword_old;
 
-        dev = pci_locate_device(PCI_ID(0x1166, 0x0205), 0);
+        while((dev = pci_locate_device(PCI_ID(0x1166, 0x0205), 0)) == 
PCI_DEV_INVALID) ;
 
         dword_old = pci_read_config32(dev, 0x4c);
         dword = dword_old | (1<<4); //enable Timer Func
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to