summaryrefslogtreecommitdiff
path: root/include/pci.h
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2010-12-17 05:57:25 -0600
committerKumar Gala <galak@kernel.crashing.org>2011-01-14 01:32:19 -0600
commit3a0e3c27a50e395a59497e8bd60a00404e662eb1 (patch)
treea7cfbf3012adf21a4009a96180ca903e606b86bb /include/pci.h
parent45a68135c12bf7d534f3ce25bef493e16d32cedb (diff)
downloadu-boot-imx-3a0e3c27a50e395a59497e8bd60a00404e662eb1.zip
u-boot-imx-3a0e3c27a50e395a59497e8bd60a00404e662eb1.tar.gz
u-boot-imx-3a0e3c27a50e395a59497e8bd60a00404e662eb1.tar.bz2
powerpc/fsl-pci: Determine pci_controller based on cfg addr for dts fixup
Previously we passed in a specifically named struct pci_controller to determine if we had setup the particular PCI bus. Now we can search for the struct so we dont have to depend on the name or the struct being statically allocated. Introduced new find_hose_by_cfg_addr() to get back a pci_controller struct back by searching for it means we can do things like dynamically allocate them or not have to expose the static structures to all users. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'include/pci.h')
-rw-r--r--include/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/pci.h b/include/pci.h
index c456006..e80b6bd 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -511,6 +511,7 @@ extern int pci_hose_write_config_word_via_dword(struct pci_controller *hose,
extern void *pci_map_bar(pci_dev_t pdev, int bar, int flags);
extern void pci_register_hose(struct pci_controller* hose);
extern struct pci_controller* pci_bus_to_hose(int bus);
+extern struct pci_controller *find_hose_by_cfg_addr(void *cfg_addr);
extern int pci_hose_scan(struct pci_controller *hose);
extern int pci_hose_scan_bus(struct pci_controller *hose, int bus);