summaryrefslogtreecommitdiff
path: root/drivers/pci/pci_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci_common.c')
-rw-r--r--drivers/pci/pci_common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/pci_common.c b/drivers/pci/pci_common.c
index f67c9c7..07f1726 100644
--- a/drivers/pci/pci_common.c
+++ b/drivers/pci/pci_common.c
@@ -224,7 +224,7 @@ phys_addr_t pci_hose_bus_to_phys(struct pci_controller *hose,
#ifdef CONFIG_DM_PCI
/* The root controller has the region information */
- hose = hose->ctlr->uclass_priv;
+ hose = pci_bus_to_hose(0);
#endif
/*
@@ -289,6 +289,11 @@ pci_addr_t pci_hose_phys_to_bus(struct pci_controller *hose,
return bus_addr;
}
+#ifdef CONFIG_DM_PCI
+ /* The root controller has the region information */
+ hose = pci_bus_to_hose(0);
+#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