public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lei Wen <leiwen@marvell.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: pantheon: enable dcache by default
Date: Wed,  5 Oct 2011 08:13:29 -0700	[thread overview]
Message-ID: <1317827609-4575-1-git-send-email-leiwen@marvell.com> (raw)

Marvell 88SV331xV5 has its specific arm cp15 opcode, which could
flush out whole dcache by only one line of asm code.

Signed-off-by: Lei Wen <leiwen@marvell.com>
---
 arch/arm/cpu/arm926ejs/pantheon/cpu.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/pantheon/cpu.c b/arch/arm/cpu/arm926ejs/pantheon/cpu.c
index 2d9c13a..8f94ea9 100644
--- a/arch/arm/cpu/arm926ejs/pantheon/cpu.c
+++ b/arch/arm/cpu/arm926ejs/pantheon/cpu.c
@@ -105,3 +105,17 @@ void i2c_clk_enable(void)
 {
 }
 #endif
+
+#ifndef CONFIG_SYS_DCACHE_OFF
+void enable_caches(void)
+{
+	/* Enable D-cache. I-cache is already enabled in start.S */
+	dcache_enable();
+}
+
+void  flush_cache(unsigned long start, unsigned long size)
+{
+	/* clean & invalidate all D cache */
+	asm("mcr p15, 0, %0, c7, c14, 0" : : "r" (0));
+}
+#endif
-- 
1.7.0.4

             reply	other threads:[~2011-10-05 15:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 15:13 Lei Wen [this message]
2011-10-07  3:53 ` [U-Boot] [PATCH] ARM: pantheon: enable dcache by default Prafulla Wadaskar
2011-10-08 14:01   ` Lei Wen
2011-10-08 13:59 ` [U-Boot] [PATCH 0/3] enable dcache for pantheon and armada100 Lei Wen
2011-10-18 15:02   ` Lei Wen
2011-11-08 20:07     ` Albert ARIBAUD
2011-11-09  5:30       ` Prafulla Wadaskar
2011-10-08 13:59 ` [U-Boot] [PATCH 1/3] ARM: add special dcache flush op code for 88SV331xV5 Lei Wen
2011-10-08 13:59 ` [U-Boot] [PATCH 2/3] ARM: pantheon: enable dcache by default Lei Wen
2011-10-08 13:59 ` [U-Boot] [PATCH 3/3] ARM: armada100: " Lei Wen

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=1317827609-4575-1-git-send-email-leiwen@marvell.com \
    --to=leiwen@marvell.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