All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: thead: fix D-cache flushing
@ 2026-09-18 20:29 Han Gao
  2026-09-20  0:56 ` Yixun Lan
  2026-09-20 10:21 ` Yao Zi
  0 siblings, 2 replies; 4+ messages in thread
From: Han Gao @ 2026-09-18 20:29 UTC (permalink / raw)
  To: Yao Zi, u-boot; +Cc: Tim Ouyang, Leo Liang, Tom Rini, Han Gao, Han Gao

Use CIPA instead of CPA to clean and invalidate cache lines. This
fixes stale DMA descriptors breaking USB enumeration on TH1520.

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
 arch/riscv/lib/thead_cmo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/lib/thead_cmo.c b/arch/riscv/lib/thead_cmo.c
index b8051e29e02b..763ff799eddd 100644
--- a/arch/riscv/lib/thead_cmo.c
+++ b/arch/riscv/lib/thead_cmo.c
@@ -40,6 +40,6 @@ void flush_dcache_range(unsigned long start, unsigned long end)
 {
 	register unsigned long i asm("a0") = start & ~(CONFIG_SYS_CACHELINE_SIZE - 1);
 	for (; i < end; i += CONFIG_SYS_CACHELINE_SIZE)
-		__asm__ __volatile__(DCACHE_CPA_A0);
+		__asm__ __volatile__(DCACHE_CIPA_A0);
 	__asm__ __volatile__(SYNC_S);
 }

---
base-commit: 211de43d0f954a00a490220c1aac9db298287c40
change-id: 20260919-fixcmo-cf56064fccd6

Best regards,
--  
Han Gao <gaohan@iscas.ac.cn>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-20 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 20:29 [PATCH] riscv: thead: fix D-cache flushing Han Gao
2026-09-20  0:56 ` Yixun Lan
2026-09-20 10:38   ` Yao Zi
2026-09-20 10:21 ` Yao Zi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.