PCI: designware: Use pci_create_root_bus() instead of pci_scan_root_bus()
authorLucas Stach <l.stach@pengutronix.de>
Wed, 23 Jul 2014 17:52:39 +0000 (19:52 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 4 Sep 2014 20:58:48 +0000 (14:58 -0600)
commit92483df2bad7649caacad60ec7b0f8016e894e11
treed727aa1b2cd0c24ce0c5ac391c7c5b7afc22fc2d
parent4f2ebe00597c44f7dc6f88a052a2981ddcf6a0b6
PCI: designware: Use pci_create_root_bus() instead of pci_scan_root_bus()

Use pci_create_root_bus() similar to other PCI host controller drivers.

The main problem with pci_scan_root_bus() is that it not only creates the
root bus, but also activates all devices on the bus.  This triggers PCI
device driver probe routines, which fail because resources haven't been
allocated.

To work around this we made sure that the host controller driver is probed
early and finishes resource allocation before any other device drivers are
registered.  Switching to pci_create_root_bus() allows us to get rid of
this special handling.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Pratyush Anand <pratyush.anand@st.com>
Acked-by: Mohit Kumar <mohit.kumar@st.com>
drivers/pci/host/pcie-designware.c