[U-Boot] [PATCH 2/5] pci: option for configurable delay between pci reset and pci bus scan

Detlev Zundel dzu at denx.de
Fri May 27 17:26:24 CEST 2011


Hi Anatolij,

> PCI cards might need some time after reset to respond.
> On some boards (mpc5200 or mpc8260 based) the PCI bus reset is
> deasserted at pci_board_init() time, so we can not use available
> "pcidelay" option for waiting before pci bus scan here. Add an option
> to delay bus scan by setting "pci_scan_delay" environment variable.

Hm, I'm not sure I understand the situation, so please correct me.  We
have a "pcidelay" variable, which is used to wait before
pci_board_init() (I'm not counting the semantically different usage in
the esd boards).  This does not fit your need, so you define
pci_scan_delay which is used _after_ pci_init_board(), correct?

If this is correct, then why don't you keep your new delay also in the
pci_init() function so that the delays are easily visible on code
inspection?  But wait, if this is only needed for this very board, then
why don't we put the delay into digsys pci_init_board?  Actually I think
this is the best way, as on this board we always need the delay as PCI
is not hotplug.

Apart from that, having two variables "pcidelay" and "pci_scan_delay" we
would need good documentation to explain their usage - the names do not
help (me) much ;)

Cheers
  Detlev

-- 
Practice random senselessness and act kind of beautiful.
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list