diff options
| author | ZhangJing <[email protected]> | 2025-05-30 13:32:58 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2025-05-30 14:06:33 +0800 |
| commit | 97893c004c65760c638fd7eb571a08fc987a55e5 (patch) | |
| tree | 71c7c743e10a1281a104bfac56307e3d338a9818 /bsp/ultrarisc/arch/ur-cp100/cache.c | |
| parent | 93cc80e461d1e6d81e84c16caee4358f229e80f3 (diff) | |
[bsp]增加超睿DP1000 bsp支持v5.2.1
Diffstat (limited to 'bsp/ultrarisc/arch/ur-cp100/cache.c')
| -rw-r--r-- | bsp/ultrarisc/arch/ur-cp100/cache.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/bsp/ultrarisc/arch/ur-cp100/cache.c b/bsp/ultrarisc/arch/ur-cp100/cache.c new file mode 100644 index 0000000000..57f47e7bed --- /dev/null +++ b/bsp/ultrarisc/arch/ur-cp100/cache.c @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2006-2025 RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2021-01-29 lizhirui first version + * 2025-05-29 Zhang Jing remove redundant code + */ + +#include <rthw.h> +#include <rtdef.h> +#include <board.h> +#include <riscv.h> +#include <cache.h> + +void rt_hw_cpu_icache_ops(int ops, void *addr, int size) +{ + if (ops == RT_HW_CACHE_INVALIDATE) + { + rt_hw_cpu_icache_invalidate(addr, size); + } + return; +} + +void rt_hw_cpu_dcache_ops(int ops, void *addr, int size) +{ + if (ops == RT_HW_CACHE_FLUSH) + { + rt_hw_cpu_dcache_clean(addr, size); + } + else + { + rt_hw_cpu_dcache_invalidate(addr, size); + } + return; +} + +void rt_hw_sync_cache_local(void *addr, int size) +{ + rt_hw_cpu_dcache_clean_local(addr, size); + rt_hw_cpu_icache_invalidate_local(addr, size); + return; +}
\ No newline at end of file |
