diff options
author | Grzegorz Bernacki <gjb@semihalf.com> | 2007-09-07 18:20:23 +0200 |
---|---|---|
committer | Rafal Jaworowski <raj@semihalf.com> | 2007-09-07 18:20:23 +0200 |
commit | 7f1913938984ef6c6a46cb53e003719196d9c5de (patch) | |
tree | 127789e73caeb3464c9941c1f96440031b1e3f6c /board/amcc/yucca/yucca.c | |
parent | 15ee4734e4e08003d73d9ead3ca80e2a0672e427 (diff) | |
download | u-boot-imx-7f1913938984ef6c6a46cb53e003719196d9c5de.zip u-boot-imx-7f1913938984ef6c6a46cb53e003719196d9c5de.tar.gz u-boot-imx-7f1913938984ef6c6a46cb53e003719196d9c5de.tar.bz2 |
[PPC440SPe] Improve PCIe configuration space access
- correct configuration space mapping
- correct bus numbering
- better access to config space
Prior to this patch, the 440SPe host/PCIe bridge was able to configure only the
first device on the first bus. We now allow to configure up to 16 buses;
also, scanning for devices behind the PCIe-PCIe bridge is supported, so
peripheral devices farther in hierarchy can be identified.
Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
Diffstat (limited to 'board/amcc/yucca/yucca.c')
-rw-r--r-- | board/amcc/yucca/yucca.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/board/amcc/yucca/yucca.c b/board/amcc/yucca/yucca.c index d08fcf3..252e4fe 100644 --- a/board/amcc/yucca/yucca.c +++ b/board/amcc/yucca/yucca.c @@ -846,7 +846,7 @@ void yucca_setup_pcie_fpga_endpoint(int port) static struct pci_controller pcie_hose[3] = {{0},{0},{0}}; -void pcie_setup_hoses(void) +void pcie_setup_hoses(int busno) { struct pci_controller *hose; int i, bus; @@ -855,7 +855,7 @@ void pcie_setup_hoses(void) * assume we're called after the PCIX hose is initialized, which takes * bus ID 0 and therefore start numbering PCIe's from 1. */ - bus = 1; + bus = busno; for (i = 0; i <= 2; i++) { /* Check for yucca card presence */ if (!yucca_pcie_card_present(i)) @@ -874,8 +874,8 @@ void pcie_setup_hoses(void) hose = &pcie_hose[i]; hose->first_busno = bus; - hose->last_busno = bus; - bus++; + hose->last_busno = bus; + hose->current_busno = bus; /* setup mem resource */ pci_set_region(hose->regions + 0, @@ -899,6 +899,7 @@ void pcie_setup_hoses(void) * Config access can only go down stream */ hose->last_busno = pci_hose_scan(hose); + bus = hose->last_busno + 1; #endif } } |