summaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorWu, Josh <Josh.wu@atmel.com>2015-07-27 11:40:16 +0800
committerTom Rini <trini@konsulko.com>2015-08-12 20:47:47 -0400
commit387871a10edc777a5d94bfdbd6b86e493991826e (patch)
tree7461973b0510ef8f0ca6eb3df08fdb350edee0c3 /arch/arm/lib
parent4dbe4b168bd3b315930bf65bb6c95eac10170026 (diff)
downloadu-boot-imx-387871a10edc777a5d94bfdbd6b86e493991826e.zip
u-boot-imx-387871a10edc777a5d94bfdbd6b86e493991826e.tar.gz
u-boot-imx-387871a10edc777a5d94bfdbd6b86e493991826e.tar.bz2
ARM: cache: add an empty stub function for invalidate/flush dcache
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 in arch/arm/lib/cache.c. And ARM cpu still can implemnt its own cache functions on the cpu folder. Signed-off-by: Josh Wu <josh.wu@atmel.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/cache.c9
1 files changed, 9 insertions, 0 deletions
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