public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [MIPS] Initialize CP0 Cause before setting up CP0 Status register
@ 2008-03-22  4:19 Shinya Kuribayashi
  0 siblings, 0 replies; only message in thread
From: Shinya Kuribayashi @ 2008-03-22  4:19 UTC (permalink / raw)
  To: u-boot

Without this change, we'll be suffering from deffered WATCH exception
once Status.EXL is cleared. Make sure Cause.WP is cleared.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 cpu/mips/start.S |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/cpu/mips/start.S b/cpu/mips/start.S
index fde2944..0ecdd83 100644
--- a/cpu/mips/start.S
+++ b/cpu/mips/start.S
@@ -211,6 +211,9 @@ reset:
 	mtc0	zero, CP0_WATCHLO
 	mtc0	zero, CP0_WATCHHI
 
+	/* WP(Watch Pending), SW0/1 should be cleared. */
+	mtc0	zero, CP0_CAUSE
+
 	/* STATUS register */
 #ifdef  CONFIG_TB0229
 	li	k0, ST0_CU0
@@ -221,9 +224,6 @@ reset:
 	and	k0, k1
 	mtc0	k0, CP0_STATUS
 
-	/* CAUSE register */
-	mtc0	zero, CP0_CAUSE
-
 	/* Init Timer */
 	mtc0	zero, CP0_COUNT
 	mtc0	zero, CP0_COMPARE

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-22  4:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-22  4:19 [U-Boot-Users] [MIPS] Initialize CP0 Cause before setting up CP0 Status register Shinya Kuribayashi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox