From 924f61ea895b9268c716791466637009bbac6469 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Mon, 21 Oct 2013 22:59:42 -0700 Subject: [PATCH] armv4: add a stub for dcache_line_bytes() This adds a stub for dcache_line_bytes() that returns a hard-coded value for now. The actual value won't matter until we try to turn on caching in the bootblock (if ever). BUG=none BRANCH=none TEST=tested on nyan Change-Id: I3876e8282698cc860ddd7b65e58246d8095958bd Signed-off-by: David Hendricks Reviewed-on: https://chromium-review.googlesource.com/173976 Reviewed-by: Gabe Black --- src/arch/arm/armv4/cache.c | 11 +++++++++++ src/arch/arm/include/armv4/arch/cache.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/src/arch/arm/armv4/cache.c b/src/arch/arm/armv4/cache.c index 729b82c411..e5cf293dce 100644 --- a/src/arch/arm/armv4/cache.c +++ b/src/arch/arm/armv4/cache.c @@ -55,6 +55,17 @@ void dcache_invalidate_all(void) { } +unsigned int dcache_line_bytes(void) +{ + /* + * TODO: Implement this correctly. For now we just return a + * reasonable value. It was added during Nyan development and + * may be used in bootblock code. It matters only if dcache is + * turned on. + */ + return 64; +} + void dcache_clean_by_mva(void const *addr, size_t len) { } diff --git a/src/arch/arm/include/armv4/arch/cache.h b/src/arch/arm/include/armv4/arch/cache.h index db4379a4c0..6a3f593f28 100644 --- a/src/arch/arm/include/armv4/arch/cache.h +++ b/src/arch/arm/include/armv4/arch/cache.h @@ -57,6 +57,9 @@ void dcache_clean_all(void); /* dcache invalidate all (on current level given by CCSELR) */ void dcache_invalidate_all(void); +/* returns number of bytes per cache line */ +unsigned int dcache_line_bytes(void); + /* dcache and MMU disable */ void dcache_mmu_disable(void);