[U-Boot-Users] [PATCH][RFC] dcache manipulation for arm926ejs
Hiroki Kaminaga
kaminaga at sm.sony.co.jp
Fri Feb 10 09:38:21 CET 2006
This patch implements dcache manipulation for arm926ejs.
Signed-off-by: Hiroki Kaminaga <kaminaga at sm.sony.co.jp>
cpu/arm926ejs/cpu.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+)
Index: u-boot-1.1.4/cpu/arm926ejs/cpu.c
===================================================================
--- u-boot-1.1.4.orig/cpu/arm926ejs/cpu.c 2005-12-17 01:39:27.000000000 +0900
+++ u-boot-1.1.4/cpu/arm926ejs/cpu.c 2006-02-10 18:28:27.000000000 +0900
@@ -154,3 +154,26 @@ int icache_status (void)
{
return (read_p15_c1 () & C1_IC) != 0;
}
+
+void dcache_enable (void)
+{
+ ulong reg;
+
+ reg = read_p15_c1 (); /* get control reg. */
+ cp_delay ();
+ write_p15_c1 (reg | C1_DC);
+}
+
+void dcache_disable (void)
+{
+ ulong reg;
+
+ reg = read_p15_c1 ();
+ cp_delay ();
+ write_p15_c1 (reg & ~C1_DC);
+}
+
+int dcache_status (void)
+{
+ return (read_p15_c1 () & C1_DC) != 0;
+}
More information about the U-Boot
mailing list