dm: pci: Use the correct hose when configuring devices
authorSimon Glass <sjg@chromium.org>
Sun, 7 Jun 2015 14:50:40 +0000 (08:50 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 15 Jul 2015 00:03:17 +0000 (18:03 -0600)
commitaec241dfb45e7763716c1cbc98942cb01a3a77fd
tree1dccf1997219cdcd4bc565751ac5142113d235d3
parentcdb6babec6422ad4b89e447b1b468f625deaea79
dm: pci: Use the correct hose when configuring devices

Only the PCI controller has access to the PCI region information. Make sure
to use the controller (rather than any attached bridges) when configuring
devices.

This corrects a failure to scan and configure devices when driver model is
enabled for PCI.

Also add a comment to explain the problem.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/pci/pci-uclass.c
drivers/pci/pci_common.c
include/pci.h