]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:18:46 +0000 (21:18 -0600)
commite357298f7ba1d5c2075cb2cc0e81382f1871ebcc
treef875a492ca45f0cb6ec587eddf05973a70f46e4e
parentd5c89dc7f65b106a823a29261bac9b93684ca5ba
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>
(cherry picked from commit 92483df2bad7649caacad60ec7b0f8016e894e11)
drivers/pci/host/pcie-designware.c