Since some driver like ohci, lcd used dcache functions. But some ARM cpu don't implement the invalidate_dcache_range()/flush_dcache_range() functions.
To avoid compiling errors this patch adds an weak empty stub function for all ARM cpu. And each cpu can implement its own implementation. If not implemented by default it will use an empty function. Signed-off-by: Josh Wu <josh...@atmel.com> --- Changes in v2: new added arch/arm/lib/cache.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c index 74cfde6..bc48f53 100644 --- a/arch/arm/lib/cache.c +++ b/arch/arm/lib/cache.c @@ -53,6 +53,15 @@ __weak void enable_caches(void) puts("WARNING: Caches not enabled\n"); } +__weak void invalidate_dcache_range(unsigned long start, unsigned long stop) +{ + /* An empty stub, real implementation should be in platform code */ +} +__weak void flush_dcache_range(unsigned long start, unsigned long stop) +{ + /* An empty stub, real implementation should be in platform code */ +} + #ifdef CONFIG_SYS_NONCACHED_MEMORY /* * Reserve one MMU section worth of address space below the malloc() area that -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot