Skip to contentSkip to conversation

mpc83xx: pcie.c enumeration for mpc83xx/pcie.c

PATCH New Baidu Boy 2 participants 3 messages Nov 27, 2010 PowerPC

lore
Share & tools
lore

Baidu Boy

author
#0 lore raw

PATCH 1/1 mpc83xx: pcie.c enumeration for mpc83xx/pcie.c

---
 arch/powerpc/cpu/mpc83xx/pcie.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
arch/powerpc/cpu/mpc83xx/pcie.c +0 -0
index 1771c48..46a706d 100644
@@ -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;

Signature · 1 line
1.7.3.1.msysgit.0
#1 lore raw

PATCH 1/1 mpc83xx: pcie.c enumeration for mpc83xx/pcie.c

Dear Baidu Boy,

Quoted 4 lines · In message <[email protected]> you…
---
 arch/powerpc/cpu/mpc83xx/pcie.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

Would you please explain what this paych is trying to do? Are you fixing a bug (if so, how does it manifest and hoiw can we test that your patch really fixes the bug), or are you adding a new feature? (which one?)

On which board(s) has this patch been tested?

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All I ask is a chance to prove that money can't make me happy.
author
#2 lore raw

PATCH 1/1 mpc83xx: pcie.c enumeration for mpc83xx/pcie.c

Dear Wolfgang:

2010/11/27 Wolfgang Denk <[email protected]>:

Quoted 9 lines

Would you please explain what this paych is trying to do? Are you fixing a bug (if so, how does it manifest and hoiw can we test that your patch really fixes the bug), or are you adding a new feature? (which one?)

On which board(s) has this patch been tested?

Best regards,

This patch is a bug fix for mpc83xx board.
I use the uboot-2010.09 to do the pcie enumeration for MPC8378E board, and It failed. From the code we can see the reason is that:
in function
mpc83xx_pcie_register_hose(...,struct pci_region *reg...)
we pass the parameter reg which is a pointer to the pcie_regions_0[] to this function.
but we changed this pointer in this function mpc83xx_pcie_register_hose().
---

	for (i = 0; i < 2; i++, reg++) {

...
}
---
And@the end of this function we call mpc83xx_pcie_register_hose(bus, reg, reg16 >= PCI_LTSSM_L0) which use the changed variable "reg".
I think this is the root cause.

Thanks!

Signature · 3 lines
------
Best Regards
Leo Liu