[U-Boot] [PATCH] sh: Changed value of CACHE_OC_NUM_ENTRIES and CACHE_OC_WAY_SHIFT

Nobuhiro Iwamatsu iwamatsu.nobuhiro at renesas.com
Tue Nov 25 03:34:01 CET 2008


SH4 is different a value of CACHE_OC_NUM_ENTRIES and
CACHE_OC_WAY_SHIFT every CPU.
This patch corrects these values.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro at renesas.com>
---
 include/asm-sh/cpu_sh4.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/asm-sh/cpu_sh4.h b/include/asm-sh/cpu_sh4.h
index b6cc6cf..d2dbfcd 100644
--- a/include/asm-sh/cpu_sh4.h
+++ b/include/asm-sh/cpu_sh4.h
@@ -26,8 +26,15 @@
 #define CCR_CACHE_ICI    0x00000800

 #define CACHE_OC_ADDRESS_ARRAY	0xf4000000
+
+#if defined (CONFIG_CPU_SH7750) || \
+	defined(CONFIG_CPU_SH7751)
 #define CACHE_OC_WAY_SHIFT	14
 #define CACHE_OC_NUM_ENTRIES	512
+#else
+#define CACHE_OC_WAY_SHIFT	13
+#define CACHE_OC_NUM_ENTRIES	256
+#endif
 #define CACHE_OC_ENTRY_SHIFT	5

 #if defined (CONFIG_CPU_SH7750) || \
-- 
1.5.6.5



More information about the U-Boot mailing list