[U-Boot] The purpose of enabling CONFIG_PCI_BOOTDELAY

All,
What is the purpose of CONFIG_PCI_BOOTDELAY? I am using uboot version 1.1.4. I know it's old, but in \drivers\pci.c there is a section of code right before pci_init.c is called that can delay the call to pci_init.c.
The code is enabled by defining CONFIG_PCI_BOOTDELAY. But why would it be necessary to delay initializing the PCI hardware?
Specifically in my case, all the resets on my board have occurred well before (500 msec) this portion of the code would execute, so it would seem safe to say that any peripherals like PCI controllers would be satisfied reset-wise.
In my case though, I need to enable CONFIG_PCI_BOOTDELAY to eliminate a WDT problem with a PCI access.
If I do not use CONFIG_PCI_BOOTDELAY, my hardware can exhibit a PCI hang, leading to the above mentioned WDT.
Any information or background that this group can provide would be appreciated.
Thank-you,
Mike
Michael Johnson American Power Conversion 132 Fairgrounds Road West Kingston, RI 02892 tele: (401) 789 - 5735 x2982

Dear Mike,
In message OF532F17EB.D2119CC3-ON852576F0.0072502F-852576F0.00725A73@apcc.com you wrote:
What is the purpose of CONFIG_PCI_BOOTDELAY? I am using uboot version
Adding a delay so the PCI controllers can come up and stabilize.
Specifically in my case, all the resets on my board have occurred well before (500 msec) this portion of the code would execute, so it would seem safe to say that any peripherals like PCI controllers would be satisfied reset-wise.
500ms is not safe. We have seen cases (for example on 440SP / 440SPe) where 5...10 seconds (!) were needed.
Best regards,
Wolfgang Denk

On Wed, Mar 24, 2010 at 4:10 PM, Wolfgang Denk wd@denx.de wrote:
Dear Mike,
In message OF532F17EB.D2119CC3-ON852576F0.0072502F-852576F0.00725A73@apcc.com you wrote:
What is the purpose of CONFIG_PCI_BOOTDELAY? I am using uboot version
Adding a delay so the PCI controllers can come up and stabilize.
Specifically in my case, all the resets on my board have occurred well before (500 msec) this portion of the code would execute, so it would seem safe to say that any peripherals like PCI controllers would be satisfied reset-wise.
500ms is not safe. We have seen cases (for example on 440SP / 440SPe) where 5...10 seconds (!) were needed.
I've seen this as well, so I agree that 500ms seems reasonable for a general value. Per the PCI 2.3 spec, the time is supposed to be min. 100mS.
this pdf is where they added it to PCI 2.2 as an ECN: http://www.pcisig.com/specifications/conventional/conventional_pci/reset_ecn...

On Wednesday 24 March 2010 22:34:59 Andrew Dyer wrote:
What is the purpose of CONFIG_PCI_BOOTDELAY? I am using uboot version
Adding a delay so the PCI controllers can come up and stabilize.
Specifically in my case, all the resets on my board have occurred well before (500 msec) this portion of the code would execute, so it would seem safe to say that any peripherals like PCI controllers would be satisfied reset-wise.
500ms is not safe. We have seen cases (for example on 440SP / 440SPe) where 5...10 seconds (!) were needed.
I've seen this as well, so I agree that 500ms seems reasonable for a general value. Per the PCI 2.3 spec, the time is supposed to be min. 100mS.
Per PCI 2.2, the PCI target must respond to config accesses within 2^25 clock cycles after #RST is de-asserted (PCI System Architecture, fourth edition, page 321). With 33MHz this is approx. 1 second.
Cheers, Stefan
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de

Hi,
we've seen platforms where the delay brings you out of problems. Of course this is caused by weird PCI hardware in most cases :-)
I must also admit that the implementation of CONFIG_PCI_BOOTDELAY is not usable in all situations. We have some boards (e.g. PMC440) that can be system cpu or PCI adapter. It's not a good idea to add a pci delay in adapter mode because your device will probably not get configured. So we implemented our own pcidelay mechanism (see board/esd/pmc440/pmc440.c), because we didn't want to adjust pcidelay when switching from system cpu to adapter mode and vice vera.
CONFIG_PCI_BOOTDELAY is of course not intended for fixing WDT issues :-)
It's a good idea to turn on this option when you are running U-Boot on system CPUs that connect to "unknown PCI hardware", e.g you have some PCI/PCIe slots on your board. We never needed it for well known onboard PCI devices.
Matthias
On Wednesday 24 March 2010 21:49, Mike.Johnson@apc.com wrote:
All,
What is the purpose of CONFIG_PCI_BOOTDELAY? I am using uboot version 1.1.4. I know it's old, but in \drivers\pci.c there is a section of code right before pci_init.c is called that can delay the call to pci_init.c.
The code is enabled by defining CONFIG_PCI_BOOTDELAY. But why would it be necessary to delay initializing the PCI hardware?
Specifically in my case, all the resets on my board have occurred well before (500 msec) this portion of the code would execute, so it would seem safe to say that any peripherals like PCI controllers would be satisfied reset-wise.
In my case though, I need to enable CONFIG_PCI_BOOTDELAY to eliminate a WDT problem with a PCI access.
If I do not use CONFIG_PCI_BOOTDELAY, my hardware can exhibit a PCI hang, leading to the above mentioned WDT.
Any information or background that this group can provide would be appreciated.
Thank-you,
participants (5)
-
Andrew Dyer
-
Matthias Fuchs
-
Mike.Johnson@apc.com
-
Stefan Roese
-
Wolfgang Denk