Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f74c31d50c3c568abf315f9b8b206a4ec7b9c9f6
Commit:     f74c31d50c3c568abf315f9b8b206a4ec7b9c9f6
Parent:     58d083192825c5fbd46fa0b1ff4d1ecc9118b692
Author:     Jesper Nilsson <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 29 17:24:10 2007 +0100
Committer:  Jesper Nilsson <[EMAIL PROTECTED]>
CommitDate: Fri Feb 8 11:06:23 2008 +0100

    CRIS v32: Add L2 cache initialization code.
---
 arch/cris/arch-v32/mm/l2cache.c |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/arch/cris/arch-v32/mm/l2cache.c b/arch/cris/arch-v32/mm/l2cache.c
new file mode 100644
index 0000000..332ff10
--- /dev/null
+++ b/arch/cris/arch-v32/mm/l2cache.c
@@ -0,0 +1,29 @@
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <memmap.h>
+#include <hwregs/reg_map.h>
+#include <hwregs/reg_rdwr.h>
+#include <hwregs/l2cache_defs.h>
+#include <asm/io.h>
+
+#define L2CACHE_SIZE 64
+
+int __init l2cache_init(void)
+{
+       reg_l2cache_rw_ctrl ctrl = {0};
+       reg_l2cache_rw_cfg cfg = {.en = regk_l2cache_yes};
+
+       ctrl.csize = L2CACHE_SIZE;
+       ctrl.cbase = L2CACHE_SIZE / 4 + (L2CACHE_SIZE % 4 ? 1 : 0);
+       REG_WR(l2cache, regi_l2cache, rw_ctrl, ctrl);
+
+       /* Flush the tag memory */
+       memset((void *)(MEM_INTMEM_START | MEM_NON_CACHEABLE), 0, 2*1024);
+
+       /* Enable the cache */
+       REG_WR(l2cache, regi_l2cache, rw_cfg, cfg);
+
+       return 0;
+}
+
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to