Skip to contentSkip to conversation

mpc83xx:pcie:bugfix for mpc83xx pcie enumeration

PATCH New Baidu Boy 2 participants 2 messages Nov 29, 2010 – Dec 13, 2010 PowerPC

lore
Share & tools
lore

Baidu Boy

author
#0 lore raw

PATCH v4 1/1 mpc83xx:pcie:bugfix for mpc83xx 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().

---
Changes for v2:
- Add some description for the patch
Changes for V3:
- Avoid line wrap in the patch
Changes for V4:
- There are some errors in V3, resubmit the patch

---
 arch/powerpc/cpu/mpc83xx/pcie.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
arch/powerpc/cpu/mpc83xx/pcie.c +6 -6
index 1771c48..46a706d 100644
@@ -201,18 +201,18 @@ static void mpc83xx_pcie_init_bus(int bus,
 	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
Applied
#1 lore raw

PATCH v4 1/1 mpc83xx:pcie:bugfix for mpc83xx pcie enumeration

Quoted 9 lines · On Mon, 29 Nov 2010 21:10:45 +0800 Baidu Boy <[email protected]> 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().

---

applied, with some minor patch title & commit message changes.

Thanks,

Kim