Commit 387871a10edc777a5d94bfdbd6b86e493991826e
Committed by
Tom Rini
1 parent
4dbe4b168b
Exists in
v2017.01-smarct4x
and in
33 other branches
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>
Showing 5 changed files with 9 additions and 32 deletions Side-by-side Diff
arch/arm/cpu/arm11/cpu.c
| ... | ... | @@ -124,14 +124,6 @@ |
| 124 | 124 | { |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | -void invalidate_dcache_range(unsigned long start, unsigned long stop) | |
| 128 | -{ | |
| 129 | -} | |
| 130 | - | |
| 131 | -void flush_dcache_range(unsigned long start, unsigned long stop) | |
| 132 | -{ | |
| 133 | -} | |
| 134 | - | |
| 135 | 127 | void flush_cache(unsigned long start, unsigned long size) |
| 136 | 128 | { |
| 137 | 129 | } |
arch/arm/cpu/arm926ejs/cache.c
| ... | ... | @@ -83,14 +83,6 @@ |
| 83 | 83 | { |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | -void invalidate_dcache_range(unsigned long start, unsigned long stop) | |
| 87 | -{ | |
| 88 | -} | |
| 89 | - | |
| 90 | -void flush_dcache_range(unsigned long start, unsigned long stop) | |
| 91 | -{ | |
| 92 | -} | |
| 93 | - | |
| 94 | 86 | void flush_cache(unsigned long start, unsigned long size) |
| 95 | 87 | { |
| 96 | 88 | } |
arch/arm/cpu/armv7/cache_v7.c
| ... | ... | @@ -304,14 +304,6 @@ |
| 304 | 304 | { |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | -void invalidate_dcache_range(unsigned long start, unsigned long stop) | |
| 308 | -{ | |
| 309 | -} | |
| 310 | - | |
| 311 | -void flush_dcache_range(unsigned long start, unsigned long stop) | |
| 312 | -{ | |
| 313 | -} | |
| 314 | - | |
| 315 | 307 | void arm_init_before_mmu(void) |
| 316 | 308 | { |
| 317 | 309 | } |
arch/arm/cpu/armv8/cache_v8.c
arch/arm/lib/cache.c
| ... | ... | @@ -53,6 +53,15 @@ |
| 53 | 53 | puts("WARNING: Caches not enabled\n"); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | +__weak void invalidate_dcache_range(unsigned long start, unsigned long stop) | |
| 57 | +{ | |
| 58 | + /* An empty stub, real implementation should be in platform code */ | |
| 59 | +} | |
| 60 | +__weak void flush_dcache_range(unsigned long start, unsigned long stop) | |
| 61 | +{ | |
| 62 | + /* An empty stub, real implementation should be in platform code */ | |
| 63 | +} | |
| 64 | + | |
| 56 | 65 | #ifdef CONFIG_SYS_NONCACHED_MEMORY |
| 57 | 66 | /* |
| 58 | 67 | * Reserve one MMU section worth of address space below the malloc() area that |