diff options
author | Baidu Boy <liucai.lfn@gmail.com> | 2010-11-29 21:10:45 +0800 |
---|---|---|
committer | Kim Phillips <kim.phillips@freescale.com> | 2010-12-13 13:55:56 -0600 |
commit | 054289f752371533285ae709003a683e6964f88f (patch) | |
tree | 486636cd2a85f8db0280c69c7f049e0d8678afa7 | |
parent | ac8983bcba75576c50307b5e8dc8fb848740ee61 (diff) | |
download | u-boot-imx-054289f752371533285ae709003a683e6964f88f.zip u-boot-imx-054289f752371533285ae709003a683e6964f88f.tar.gz u-boot-imx-054289f752371533285ae709003a683e6964f88f.tar.bz2 |
mpc83xx: fix pcie enumeration
This patch fix a problem for the pcie enumeration for mpc83xx cpus. Without
this we will not get correct value in hose->regions[...].
The pointer *reg in function mpc83xx_pcie_init_bus() shall not be changed.
Because we will use this pointer as a parameter to call function
mpc83xx_pcie_register_hose().
Signed-off-by: Baidu Boy <liucai.lfn@gmail.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/pcie.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/cpu/mpc83xx/pcie.c b/arch/powerpc/cpu/mpc83xx/pcie.c index 1771c48..46a706d 100644 --- a/arch/powerpc/cpu/mpc83xx/pcie.c +++ b/arch/powerpc/cpu/mpc83xx/pcie.c @@ -201,18 +201,18 @@ static void mpc83xx_pcie_init_bus(int bus, struct pci_region *reg) out_le32(&out_win->tarl, 0); out_le32(&out_win->tarh, 0); - for (i = 0; i < 2; i++, reg++) { + for (i = 0; i < 2; i++) { u32 ar; - if (reg->size == 0) + if (reg[i].size == 0) break; out_win = &pex->bridge.pex_outbound_win[i + 1]; - out_le32(&out_win->bar, reg->phys_start); - out_le32(&out_win->tarl, reg->bus_start); + out_le32(&out_win->bar, reg[i].phys_start); + out_le32(&out_win->tarl, reg[i].bus_start); out_le32(&out_win->tarh, 0); - ar = PEX_OWAR_EN | (reg->size & PEX_OWAR_SIZE); - if (reg->flags & PCI_REGION_IO) + ar = PEX_OWAR_EN | (reg[i].size & PEX_OWAR_SIZE); + if (reg[i].flags & PCI_REGION_IO) ar |= PEX_OWAR_TYPE_IO; else ar |= PEX_OWAR_TYPE_MEM; |