All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm_cortexa8: support cache flush to other soc
Date: Fri, 04 Sep 2009 17:26:00 +0900	[thread overview]
Message-ID: <4AA0CF18.9020807@samsung.com> (raw)

Current code is supported only omap3 soc.
this patch will support s5pc1xx(s5pc100 and s5pc110) soc also.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
---
 cpu/arm_cortexa8/cpu.c |   24 +++++++++++-------------
 1 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/cpu/arm_cortexa8/cpu.c b/cpu/arm_cortexa8/cpu.c
index 5a5981e..3d430b1 100644
--- a/cpu/arm_cortexa8/cpu.c
+++ b/cpu/arm_cortexa8/cpu.c
@@ -35,9 +35,6 @@
 #include <command.h>
 #include <asm/system.h>
 #include <asm/cache.h>
-#ifndef CONFIG_L2_OFF
-#include <asm/arch/sys_proto.h>
-#endif
 
 static void cache_flush(void);
 
@@ -61,17 +58,18 @@ int cleanup_before_linux(void)
 	cache_flush();
 
 #ifndef CONFIG_L2_OFF
-	/* turn off L2 cache */
-	l2_cache_disable();
-	/* invalidate L2 cache also */
-	v7_flush_dcache_all(get_device_type());
-#endif
-	i = 0;
-	/* mem barrier to sync up things */
-	asm("mcr p15, 0, %0, c7, c10, 4": :"r"(i));
+	if (get_device_type() != 0xC100) {
+		/* turn off L2 cache */
+		l2_cache_disable();
+		/* invalidate L2 cache also */
+		v7_flush_dcache_all(get_device_type());
 
-#ifndef CONFIG_L2_OFF
-	l2_cache_enable();
+		i = 0;
+		/* mem barrier to sync up things */
+		asm("mcr p15, 0, %0, c7, c10, 4": :"r"(i));
+
+		l2_cache_enable();
+	}
 #endif
 
 	return 0;
-- 
1.5.4.3

             reply	other threads:[~2009-09-04  8:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04  8:26 Minkyu Kang [this message]
2009-09-04  8:43 ` [U-Boot] [PATCH] arm_cortexa8: support cache flush to other soc Dirk Behme
2009-09-04  9:34   ` Kyungmin Park
2009-09-04 10:45     ` Dirk Behme
2009-09-04 10:54       ` Kyungmin Park
2009-09-04 11:43         ` Dirk Behme
2009-09-04 14:29           ` Minkyu Kang
2009-09-04 15:06             ` Dirk Behme
2009-09-07  1:31               ` Minkyu Kang
2009-09-07 16:52                 ` Dirk Behme
2009-09-08  0:06                   ` Minkyu Kang
2009-09-08  0:47                     ` Tom
2009-09-08 18:51                       ` Dirk Behme
2009-09-08 22:23                         ` Tom
2009-09-09  5:34                           ` Minkyu Kang
2009-09-09 11:24                             ` Tom
2009-09-09 12:04                               ` Minkyu Kang
2009-09-10 19:02                           ` Tom
2009-09-10 19:36                             ` Paulraj, Sandeep
2009-09-04 22:24       ` Jean-Christophe PLAGNIOL-VILLARD
2009-09-04 11:06     ` Wolfgang Denk
2009-09-04 11:11       ` Kyungmin Park
2009-09-04 11:48         ` 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=4AA0CF18.9020807@samsung.com \
    --to=mk7.kang@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.