pci: Configure expansion ROM during auto config process
[oweals/u-boot.git] / drivers / pci / pci_common.c
index b9ff23f35bc8627650994c0e573adbe9c63eff14..f67c9c7b2fbf57a680f989f50312788e6ff89016 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <dm.h>
 #include <errno.h>
 #include <pci.h>
 #include <asm/io.h>
@@ -221,6 +222,11 @@ phys_addr_t pci_hose_bus_to_phys(struct pci_controller *hose,
                return phys_addr;
        }
 
+#ifdef CONFIG_DM_PCI
+       /* The root controller has the region information */
+       hose = hose->ctlr->uclass_priv;
+#endif
+
        /*
         * if PCI_REGION_MEM is set we do a two pass search with preference
         * on matches that don't have PCI_REGION_SYS_MEMORY set