
2 Sep
2015
2 Sep
'15
4:48 a.m.
On 1 September 2015 at 00:25, Bin Meng bmeng.cn@gmail.com wrote:
On Tue, Sep 1, 2015 at 8:55 AM, Simon Glass sjg@chromium.org wrote:
At present, until a PCI bus is probed, it cannot be found by its sequence number unless it has an alias. This is the same with any device.
However with PCI this is more annoying than usual, since bus 0 is always the same device.
Add a function that tries a little harder to locate PCI bus 0. This means that PCI enumeration will happen automatically on the first access.
Signed-off-by: Simon Glass sjg@chromium.org
Changes in v3:
- Correct failure logic in pci_get_bus()
- Use pci_get_bus in pci_bus_to_hose()
Changes in v2:
- Adjust pci_get_bus() to probe bus 0 so that the required bus is found
drivers/pci/pci-uclass.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-)
[snip]
Reviewed-by: Bin Meng bmeng.cn@gmail.com
Applied to u-boot-x86.