public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@nbase.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Unlock cache on mpc824x
Date: Tue, 2 Sep 2003 16:20:02 +0300	[thread overview]
Message-ID: <20030902132002.GK10453@nbase.co.il> (raw)

Hello,

 MPC824x locks way0 of the cache while booting for use as initial RAM, but
it never unlocks it. The cache remains locked even after booting Linux.

Attached patch unlocks cache after relocation to RAM and invalidates locked
entries.

--
			Gleb.
-------------- next part --------------
--- u-boot/cpu/mpc824x/start.S	2003-07-25 02:39:07.000000000 +0300
+++ u-boot.p/cpu/mpc824x/start.S	2003-09-02 16:01:59.000000000 +0300
@@ -526,11 +526,26 @@
 	stwu	r0,-4(r7)
 	bdnz	3b
 
+4:
+#if !defined(CONFIG_BMW)
+/* Unlock the data cache and invalidate locked area */
+	xor	r0, r0, r0
+	mtspr	1011, r0
+	lis	r4, CFG_INIT_RAM_ADDR at h
+	ori	r4, r4, CFG_INIT_RAM_ADDR at l
+	li	r0, 128
+	mtctr	r0
+41:
+	dcbi	r0, r4
+	addi	r4, r4, 32
+	bdnz	41b
+#endif
+
 /*
  * Now flush the cache: note that we must start from a cache aligned
  * address. Otherwise we might miss one cache line.
  */
-4:	cmpwi	r6,0
+	cmpwi	r6,0
 	add	r5,r3,r5
 	beq	7f		/* Always flush prefetch queue in any case */
 	subi	r0,r6,1

             reply	other threads:[~2003-09-02 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-02 13:20 Gleb Natapov [this message]
2003-09-10 21:03 ` [U-Boot-Users] [PATCH] Unlock cache on mpc824x Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030902132002.GK10453@nbase.co.il \
    --to=gleb@nbase.co.il \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox