1 /*
2  * Copyright (c) 2006-2021, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2021-01-29     lizhirui     first version
9  */
10 
11 #include <rthw.h>
12 #include <rtdef.h>
13 #include <board.h>
14 #include <riscv.h>
15 #include <cache.h>
16 
rt_cpu_icache_line_size()17 rt_inline rt_uint32_t rt_cpu_icache_line_size()
18 {
19     return 0;
20 }
21 
rt_cpu_dcache_line_size()22 rt_inline rt_uint32_t rt_cpu_dcache_line_size()
23 {
24     return 0;
25 }
26 
rt_hw_cpu_icache_ops(int ops,void * addr,int size)27 void rt_hw_cpu_icache_ops(int ops, void *addr, int size)
28 {
29     if (ops == RT_HW_CACHE_INVALIDATE)
30     {
31         rt_hw_cpu_icache_invalidate(addr, size);
32     }
33 }
34 
rt_hw_cpu_dcache_ops(int ops,void * addr,int size)35 void rt_hw_cpu_dcache_ops(int ops, void *addr, int size)
36 {
37     if (ops == RT_HW_CACHE_FLUSH)
38     {
39         rt_hw_cpu_dcache_clean(addr, size);
40     }
41     else
42     {
43         rt_hw_cpu_dcache_invalidate(addr, size);
44     }
45 }
46 
rt_hw_cpu_icache_status_local()47 rt_base_t rt_hw_cpu_icache_status_local()
48 {
49     return 0;
50 }
51 
rt_hw_cpu_dcache_status()52 rt_base_t rt_hw_cpu_dcache_status()
53 {
54     return 0;
55 }
56 
rt_hw_sync_cache_local(void * addr,int size)57 void rt_hw_sync_cache_local(void *addr, int size)
58 {
59 }
60