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/katmai/katmai.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/katmai/katmai.c')
-rw-r--r-- | board/amcc/katmai/katmai.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/board/amcc/katmai/katmai.c b/board/amcc/katmai/katmai.c index b804d55..a9ae4a3 100644 --- a/board/amcc/katmai/katmai.c +++ b/board/amcc/katmai/katmai.c @@ -392,7 +392,7 @@ int katmai_pcie_card_present(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; @@ -401,7 +401,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 katmai card presence */ if (!katmai_pcie_card_present(i)) @@ -418,8 +418,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, @@ -443,6 +443,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 } } |