Submitter | Patrick Georgi |
---|---|
Date | 2010-10-26 15:57:08 |
Message ID | <4CC6FA54.5010202@georgi-clan.de> |
Download | mbox | patch |
Permalink | /patch/2170/ |
State | New |
Headers | show |
Comments
Patrick Georgi wrote: > 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 <patrick.georgi@coresystems.de> NAK-by: Peter Stuge <peter@stuge.se> I think that having a timeout is pretty important, and if it times out then call die. I'll ack that. Maybe give it a second or so? //Peter
* Peter Stuge <peter@stuge.se> [101026 18:36]: > Patrick Georgi wrote: > > 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 <patrick.georgi@coresystems.de> > > NAK-by: Peter Stuge <peter@stuge.se> > > I think that having a timeout is pretty important, and if it times > out then call die. I'll ack that. Maybe give it a second or so? Remember it can not print anything this early.
Stefan Reinauer wrote: > > > I opted against a timeout + error, as there's no useful alternative > > > action to do on error. > > > > I think that having a timeout is pretty important, and if it times > > out then call die. I'll ack that. Maybe give it a second or so? > > Remember it can not print anything this early. die() should still work, right? A POST code should be there at least. //Peter
Patch
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
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 <patrick.georgi@coresystems.de>