Revert "fix(c9xx): don't flush dcache when invalidating"

This reverts commit adec30ace4.
This commit is contained in:
Han Gao
2024-01-31 13:37:42 +08:00
committed by Han Gao/Revy/Rabenda
parent 74eca2553e
commit 4529d8d50f
5 changed files with 17 additions and 3 deletions

View File

@@ -73,6 +73,7 @@ extern ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
#endif
extern void flush_dcache_range(unsigned long start, unsigned long end);
extern void invalidate_dcache_range(unsigned long start, unsigned long end);
extern void invalid_dcache_range(unsigned long start, unsigned long end);
#ifdef CONFIG_CMD_MEMTEST
int test_stuck_address(ulv *bufa, ulong count);

View File

@@ -50,6 +50,7 @@ u64 t_end;
extern void flush_dcache_range(unsigned long start, unsigned long end);
extern void invalidate_dcache_range(unsigned long start, unsigned long end);
extern void invalid_dcache_range(unsigned long start, unsigned long end);
extern unsigned long get_ddr_density(void);
extern int riscv_get_time(u64 *time);
@@ -304,7 +305,7 @@ int prbs_test(struct PRBS_ELE *prbs, unsigned int *buf, int pos, bool random_dq,
// compare result
// invalid cache before read
mdelay(100);
invalidate_dcache_range((ulong)buf, (ulong)buf+(bit_len*4*2*2));
invalid_dcache_range((ulong)buf, (ulong)buf+(bit_len*4*2*2));
p1 = buf;
bit_cnt = 0;
for (i = 0; i < bit_len; i++) {