Skip to contentSkip to conversation

powerpc/85xx:Fix NAND code base to support debugger

PATCH Superseded Prabhakar Kushwaha 1 participant 1 message Mar 21, 2012 PowerPC

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 powerpc/85xx:Fix NAND code base to support debugger

Update NAND code base to ovecome e500 and e500v2's second limitation i.e. IVPR
+ IVOR15 should be valid fetchable OP code address.

As NAND SPL does not compile vector table so making sure IVOR + IVOR15 points to any fetchable valid data

---
Based upon git://git.denx.de/u-boot.git branch master

No change, Resending again

Tested on
- SoC having E500 Family processor (P1010RDB, BSC9131RDB)
- SoC having E500MC Family processor (P4080DS, P3041DS)

 arch/powerpc/cpu/mpc85xx/start.S |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)
arch/powerpc/cpu/mpc85xx/start.S +13 -5
index cef00ba..0d50f6f 100644
@@ -1431,17 +1431,25 @@ relocate_code:
 7:	sync			/* Wait for all icbi to complete on bus */
 	isync
 
-	/*
-	 * Re-point the IVPR at RAM
-	 */
-	mtspr	IVPR,r10
-
 /*
  * We are done. Do not return, instead branch to second part of board
  * initialization, now running from RAM.
  */
 
 	addi	r0,r10,in_ram - _start + _START_OFFSET
+
+#if defined(CONFIG_E500) && defined(CONFIG_NAND_SPL)
+/*
+ * As IVPR is going to point RAM address,
+ * Make sure IVOR15 has valid opcode to support debugger
+ */
+	mtspr	IVOR15,r0
+#endif
+	/*
+	 * Re-point the IVPR at RAM
+	 */
+	mtspr	IVPR,r10
+
 	mtlr	r0
 	blr				/* NEVER RETURNS! */
 	.globl	in_ram
Signature · 1 line
1.7.5.4