Skip to content
Snippets Groups Projects
Commit 1d29c718 authored by Leo Yu-Chi Liang's avatar Leo Yu-Chi Liang
Browse files

andes: Use UCCTLCOMMAND instead of MCCTLCOMMAND


Use CSR_UCCTLCOMMAND instead of CSR_MCCTLCOMMAND
to do cache flush operation in M-mode and S-mode.

Signed-off-by: default avatarLeo Yu-Chi Liang <ycliang@andestech.com>
parent cea0ed2e
No related branches found
No related tags found
No related merge requests found
......@@ -43,9 +43,7 @@ static void cache_ops(int (*ops)(struct udevice *dev))
void flush_dcache_all(void)
{
#if CONFIG_IS_ENABLED(RISCV_MMODE)
csr_write(CSR_MCCTLCOMMAND, CCTL_L1D_WBINVAL_ALL);
#endif
csr_write(CSR_UCCTLCOMMAND, CCTL_L1D_WBINVAL_ALL);
}
void flush_dcache_range(unsigned long start, unsigned long end)
......
......@@ -12,7 +12,7 @@
#define CSR_MCACHE_CTL 0x7ca
#define CSR_MMISC_CTL 0x7d0
#define CSR_MCCTLCOMMAND 0x7cc
#define CSR_UCCTLCOMMAND 0x80c
/* mcache_ctl register */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment