public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [MIPS] Fix dcache_status()
@ 2008-03-23 16:28 Shinya Kuribayashi
  0 siblings, 0 replies; only message in thread
From: Shinya Kuribayashi @ 2008-03-23 16:28 UTC (permalink / raw)
  To: u-boot

You can't judge UNCACHED by Config.K0 LSB.

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

 cpu/mips/cache.S |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)


diff --git a/cpu/mips/cache.S b/cpu/mips/cache.S
index bb42616..e6f3175 100644
--- a/cpu/mips/cache.S
+++ b/cpu/mips/cache.S
@@ -256,9 +256,13 @@ NESTED(mips_cache_reset, 0, ra)
 *
 */
 LEAF(dcache_status)
-	mfc0	v0, CP0_CONFIG
-	andi	v0, v0, 1
-	j	ra
+	mfc0	t0, CP0_CONFIG
+	li	t1, CONF_CM_UNCACHED
+	andi	t0, t0, CONF_CM_CMASK
+	move	v0, zero
+	beq	t0, t1, 2f
+	li	v0, 1
+2:	jr	ra
 	END(dcache_status)
 
 /*******************************************************************************

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

only message in thread, other threads:[~2008-03-23 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-23 16:28 [U-Boot-Users] [MIPS] Fix dcache_status() Shinya Kuribayashi

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