diff options
| author | Tom Rini <trini@konsulko.com> | 2019-01-15 22:05:05 -0500 | 
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2019-01-15 22:05:05 -0500 | 
| commit | 0cd35f392000fb0783149d9b5f66c5f2e01bcbf1 (patch) | |
| tree | b2bc80bd79b2ba7aa387abc575630b03b7470c36 /arch/riscv/cpu/ax25/cache.c | |
| parent | e807f6b5f9a164dc1fc35e1c733fa343acf335c0 (diff) | |
| parent | 91882c472d8c0aef4db699d3f2de55bf43d4ae4b (diff) | |
Merge git://git.denx.de/u-boot-riscv
1. Improve cache implementation.
2. Fix and improve standalone applications
Diffstat (limited to 'arch/riscv/cpu/ax25/cache.c')
| -rw-r--r-- | arch/riscv/cpu/ax25/cache.c | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/arch/riscv/cpu/ax25/cache.c b/arch/riscv/cpu/ax25/cache.c index 8d6ae170b8c..228fc55f56b 100644 --- a/arch/riscv/cpu/ax25/cache.c +++ b/arch/riscv/cpu/ax25/cache.c @@ -6,6 +6,28 @@  #include <common.h> +void flush_dcache_all(void) +{ +	/* +	 * Andes' AX25 does not have a coherence agent. U-Boot must use data +	 * cache flush and invalidate functions to keep data in the system +	 * coherent. +	 * The implementation of the fence instruction in the AX25 flushes the +	 * data cache and is used for this purpose. +	 */ +	asm volatile ("fence" ::: "memory"); +} + +void flush_dcache_range(unsigned long start, unsigned long end) +{ +	flush_dcache_all(); +} + +void invalidate_dcache_range(unsigned long start, unsigned long end) +{ +	flush_dcache_all(); +} +  void icache_enable(void)  {  #ifndef CONFIG_SYS_ICACHE_OFF | 
