aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/cpu/c9xx/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/cpu/c9xx/cpu.c')
-rw-r--r--arch/riscv/cpu/c9xx/cpu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/riscv/cpu/c9xx/cpu.c b/arch/riscv/cpu/c9xx/cpu.c
index ba370cfb..c7eeee88 100644
--- a/arch/riscv/cpu/c9xx/cpu.c
+++ b/arch/riscv/cpu/c9xx/cpu.c
@@ -141,8 +141,9 @@ void dcache_enable(void)
#ifdef CONFIG_SPL_RISCV_MMODE
#ifdef CONFIG_TARGET_LIGHT_C910
asm volatile (
- "li x29, 0x11ff\n\t"
- "csrw mhcr, x29\n\t"
+ "csrr x29, mhcr\n\t"
+ "ori x28, x29, 0x2\n\t"
+ "csrw mhcr, x28\n\t"
);
#endif
#endif