summaryrefslogtreecommitdiff
path: root/include/asm-ppc/cache.h
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-01-08 01:22:21 -0600
committerAndrew Fleming-AFLEMING <afleming@freescale.com>2008-01-09 16:25:04 -0600
commitb009f3eca99bb7b9e6ba6639a8909a138dd5e9fe (patch)
tree4346cd75759fe027b7d6871e54965871efd80f94 /include/asm-ppc/cache.h
parentb964e9368f45372aaf1da0c13fe56f6d81ae8e96 (diff)
downloadu-boot-imx-b009f3eca99bb7b9e6ba6639a8909a138dd5e9fe.zip
u-boot-imx-b009f3eca99bb7b9e6ba6639a8909a138dd5e9fe.tar.gz
u-boot-imx-b009f3eca99bb7b9e6ba6639a8909a138dd5e9fe.tar.bz2
85xx: Remove cache config from configs.h
Either use the standard defines in asm/cache.h or grab the information at runtime from the L1CFG SPR. Also, minor cleanup in cache.h to make the code a bit more readable. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include/asm-ppc/cache.h')
-rw-r--r--include/asm-ppc/cache.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/asm-ppc/cache.h b/include/asm-ppc/cache.h
index e29bfc2..9d9b971 100644
--- a/include/asm-ppc/cache.h
+++ b/include/asm-ppc/cache.h
@@ -8,15 +8,13 @@
#include <asm/processor.h>
/* bytes per L1 cache line */
-#if !(defined(CONFIG_8xx) || defined(CONFIG_IOP480))
-#if defined(CONFIG_PPC64BRIDGE)
+#if defined(CONFIG_8xx) || defined(CONFIG_IOP480)
+#define L1_CACHE_SHIFT 4
+#elif defined(CONFIG_PPC64BRIDGE)
#define L1_CACHE_SHIFT 7
#else
#define L1_CACHE_SHIFT 5
-#endif /* PPC64 */
-#else
-#define L1_CACHE_SHIFT 4
-#endif /* !(8xx || IOP480) */
+#endif
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)