diff mbox

[U-Boot,V2] mpc83xx:pcie:bugfix for mpc83xx pcie enumeration

Message ID AANLkTinvbAsW2=WRZgQL43yN076top6Xp-5Dn=k1Yn2E@mail.gmail.com
State Changes Requested
Delegated to: Kim Phillips
Headers show

Commit Message

Baidu Boy Nov. 28, 2010, 1:06 a.m. UTC
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>
---
Changes for v2:
       - Add some description for the patch.

 arch/powerpc/cpu/mpc83xx/pcie.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

 			ar |= PEX_OWAR_TYPE_MEM;

Comments

Kim Phillips Nov. 28, 2010, 3:12 p.m. UTC | #1
On Sun, 28 Nov 2010 09:06:37 +0800
Baidu Boy <liucai.lfn@gmail.com> wrote:

> 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>
> ---

doesn't apply:

Applying: mpc83xx:pcie:bugfix for mpc83xx pcie enumeration
fatal: corrupt patch at line 13

please resubmit.

Thanks,

Kim
Baidu Boy Nov. 29, 2010, 1:24 p.m. UTC | #2
2010/11/28 Kim Phillips <kim.phillips@freescale.com>:
> doesn't apply:
>
> Applying: mpc83xx:pcie:bugfix for mpc83xx pcie enumeration
> fatal: corrupt patch at line 13
>
> please resubmit.
>
> Thanks,
>
> Kim
>
>

Please use this one http://patchwork.ozlabs.org/patch/73424/

My mailer wrap the long line in the V2 patch.

Thanks
diff mbox

Patch

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