Skip to content

Commit 08ceda1

Browse files
committed
style:remove redundant code and normalize code formatting
1 parent 48d41f6 commit 08ceda1

File tree

6 files changed

+10
-75
lines changed

6 files changed

+10
-75
lines changed

bsp/ultrarisc/drivers/SConscript

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,4 @@ group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
1313

1414
objs = [group]
1515

16-
list = os.listdir(cwd)
17-
18-
for item in list:
19-
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
20-
objs = objs + SConscript(os.path.join(item, 'SConscript'))
21-
2216
Return('objs')

bsp/ultrarisc/drivers/drv_dw_spi.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ static inline rt_uint32_t tx_max(struct dw_spi *dw_spi_dev)
137137
{
138138
return tx_left < tx_room ? tx_left : tx_room;
139139
}
140-
141-
142140
}
143141

144142
static inline rt_uint32_t rx_max(struct dw_spi *dw_spi_dev)

bsp/ultrarisc/ur_dp1000_evb/.ci/attachconfig/ci.attachconfig.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,5 @@
11
peripheral.MMC:
22
kconfig:
3-
- CONFIG_BSP_USING_DW_SPI=y
4-
- CONFIG_DW_SPI_IRQ_BASE=19
5-
- CONFIG_DW_SPI_BASE_ADDR=0x20320000
6-
- CONFIG_DW_SPI_MAX_FREQ=62500000
7-
- CONFIG_BSP_USING_MMC=y
8-
9-
rtsmart:
10-
kconfig:
11-
- CONFIG_RT_USING_SMART=y
12-
- CONFIG_KERNEL_VADDR_START=0xffffffc000000000
13-
- CONFIG_ARCH_REMAP_KERNEL=y
14-
- CONFIG_RT_USING_DFS_PTYFS=y
15-
- CONFIG_RT_USING_DFS_PROCFS=y
16-
- CONFIG_RT_USING_PAGECACHE=y
17-
- CONFIG_RT_PAGECACHE_COUNT=4096
18-
- CONFIG_RT_PAGECACHE_ASPACE_COUNT=1024
19-
- CONFIG_RT_PAGECACHE_PRELOAD=4
20-
- CONFIG_RT_PAGECACHE_HASH_NR=1024
21-
- CONFIG_RT_PAGECACHE_GC_WORK_LEVEL=90
22-
- CONFIG_RT_PAGECACHE_GC_STOP_LEVEL=70
23-
- CONFIG_RT_USING_POSIX_EPOLL=y
24-
- CONFIG_RT_USING_POSIX_SIGNALFD=y
25-
- CONFIG_RT_SIGNALFD_MAX_NUM=10
26-
- CONFIG_RT_USING_LWP=y
27-
- CONFIG_LWP_USING_RUNTIME=y
28-
- CONFIG_RT_LWP_MAX_NR=30
29-
- CONFIG_LWP_TASK_STACK_SIZE=16384
30-
- CONFIG_RT_CH_MSG_MAX_NR=1024
31-
- CONFIG_LWP_TID_MAX_NR=64
32-
- CONFIG_RT_LWP_SHM_MAX_NR=64
33-
- CONFIG_RT_USING_LDSO=y
34-
- CONFIG_LWP_USING_TERMINAL=y
35-
- CONFIG_LWP_PTY_MAX_PARIS_LIMIT=64
363
- CONFIG_BSP_USING_DW_SPI=y
374
- CONFIG_DW_SPI_IRQ_BASE=19
385
- CONFIG_DW_SPI_BASE_ADDR=0x20320000

bsp/ultrarisc/ur_dp1000_evb/README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ scons
8888
```
8989

9090
成功运行时,串口端的输出如下:
91-
9291
```shell
9392
OpenSBI v1.6-66-gbeb27559acd
9493
____ _____ ____ _____
@@ -165,16 +164,5 @@ scons
165164
msh />
166165
/ #
167166
```
168-
169167
# 6. 联系人信息
170-
171-
172-
173-
174-
175-
176-
177-
178-
179-
180-
168+

libcpu/risc-v/ultrarisc/ur-cp100/cache.c

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Change Logs:
77
* Date Author Notes
88
* 2021-01-29 lizhirui first version
9+
* 2025-05-29 Zhang Jing remove redundant code
910
*/
1011

1112
#include <rthw.h>
@@ -14,22 +15,13 @@
1415
#include <riscv.h>
1516
#include <cache.h>
1617

17-
rt_inline rt_uint32_t rt_cpu_icache_line_size()
18-
{
19-
return 0;
20-
}
21-
22-
rt_inline rt_uint32_t rt_cpu_dcache_line_size()
23-
{
24-
return 0;
25-
}
26-
2718
void rt_hw_cpu_icache_ops(int ops, void *addr, int size)
2819
{
2920
if (ops == RT_HW_CACHE_INVALIDATE)
3021
{
3122
rt_hw_cpu_icache_invalidate(addr, size);
3223
}
24+
return;
3325
}
3426

3527
void rt_hw_cpu_dcache_ops(int ops, void *addr, int size)
@@ -42,18 +34,12 @@ void rt_hw_cpu_dcache_ops(int ops, void *addr, int size)
4234
{
4335
rt_hw_cpu_dcache_invalidate(addr, size);
4436
}
45-
}
46-
47-
rt_base_t rt_hw_cpu_icache_status_local()
48-
{
49-
return 0;
50-
}
51-
52-
rt_base_t rt_hw_cpu_dcache_status()
53-
{
54-
return 0;
37+
return;
5538
}
5639

5740
void rt_hw_sync_cache_local(void *addr, int size)
5841
{
42+
rt_hw_cpu_dcache_clean_local(addr, size);
43+
rt_hw_cpu_icache_invalidate_local(addr, size);
44+
return;
5945
}

libcpu/risc-v/ultrarisc/ur-cp100/cache.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ rt_always_inline void rt_hw_cpu_icache_invalidate_all_local(void)
7777

7878
/** instruction barrier */
7979
static inline void rt_hw_cpu_sync(void)
80-
{}
80+
{
81+
__asm__ __volatile__("fence.i" ::: "memory");
82+
}
8183

8284
/**
8385
* @brief local cpu icahce & dcache synchronization

0 commit comments

Comments
 (0)