public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michael Durrant <mdurrant@arcturusnetworks.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] MCF528x cache errata / fix [PATCH] -- resent in git format
Date: Wed, 20 Jan 2010 13:34:06 -0500	[thread overview]
Message-ID: <4B574C9E.4040005@arcturusnetworks.com> (raw)
In-Reply-To: <4B561AFE.6000708@arcturusnetworks.com>

cpu_mcf52x2_cache.patch
   - Setup CACR, bit 5 set to 0 per Freescale chip errata
     (MCF5282DE, Rev. 6, 5/2009)

Signed-off-by: David Wu <davidwu@arcturusnetworks.com>
Signed-off-by: Michael Durrant <mdurrant@arcturusnetworks.com>
---
 cpu/mcf52x2/cpu_init.c |    6 ++++--
 cpu/mcf52x2/start.S    |    5 ++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/cpu/mcf52x2/cpu_init.c b/cpu/mcf52x2/cpu_init.c
index 5b06930..60b55ce 100644
--- a/cpu/mcf52x2/cpu_init.c
+++ b/cpu/mcf52x2/cpu_init.c
@@ -609,8 +609,10 @@ void cpu_init_f(void)
 
 #endif                /* CONFIG_MONITOR_IS_IN_RAM */
 
-    /* defer enabling cache until boot (see do_go) */
-    /* icache_enable(); */
+#if defined(CONFIG_SYS_ENABLE_ICACHE)
+    /* enable instruction cache now */
+    icache_enable();
+#endif
 }
 
 /*
diff --git a/cpu/mcf52x2/start.S b/cpu/mcf52x2/start.S
index 0dd4de5..5540c95 100644
--- a/cpu/mcf52x2/start.S
+++ b/cpu/mcf52x2/start.S
@@ -417,7 +417,10 @@ icache_enable:
     movec    %d0, %ACR0            /* Enable cache */
     move.l    #0xff00c000, %d0        /* Setup cache mask */
     movec    %d0, %ACR1            /* Enable cache */
-    move.l    #0x80400100, %d0        /* Setup cache mask, data cache
disabel*/
+    move.l    #0x80400000, %d0        /* Setup cache mask, data cache
disabled,
+                           bit 5 set to 0 per chip errata
+                           (MCF5282DE, Rev. 6, 5/2009)
+                         */
     movec    %d0, %CACR            /* Enable cache */
     moveq    #1, %d0
 icache_state_access_1:
-- 1.4.3.4

      reply	other threads:[~2010-01-20 18:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19 20:50 [U-Boot] MCF528x cache errata / fix [PATCH] Michael Durrant
2010-01-20 18:34 ` Michael Durrant [this message]

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=4B574C9E.4040005@arcturusnetworks.com \
    --to=mdurrant@arcturusnetworks.com \
    --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