diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2010-12-17 05:57:25 -0600 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-01-14 01:32:19 -0600 |
commit | 3a0e3c27a50e395a59497e8bd60a00404e662eb1 (patch) | |
tree | a7cfbf3012adf21a4009a96180ca903e606b86bb /drivers/pci/fsl_pci_init.c | |
parent | 45a68135c12bf7d534f3ce25bef493e16d32cedb (diff) | |
download | bootable_bootloader_goldelico_gta04-3a0e3c27a50e395a59497e8bd60a00404e662eb1.zip bootable_bootloader_goldelico_gta04-3a0e3c27a50e395a59497e8bd60a00404e662eb1.tar.gz bootable_bootloader_goldelico_gta04-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 'drivers/pci/fsl_pci_init.c')
-rw-r--r-- | drivers/pci/fsl_pci_init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index 5b34dcb..71ab02b 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -518,11 +518,14 @@ void fsl_pci_config_unlock(struct pci_controller *hose) #include <fdt_support.h> void ft_fsl_pci_setup(void *blob, const char *pci_compat, - struct pci_controller *hose, unsigned long ctrl_addr) + unsigned long ctrl_addr) { int off; u32 bus_range[2]; phys_addr_t p_ctrl_addr = (phys_addr_t)ctrl_addr; + struct pci_controller *hose; + + hose = find_hose_by_cfg_addr((void *)(ctrl_addr)); /* convert ctrl_addr to true physical address */ p_ctrl_addr = (phys_addr_t)ctrl_addr - CONFIG_SYS_CCSRBAR; |