Skip to content

Commit

Permalink
xtensa: fix up_enable_dcache
Browse files Browse the repository at this point in the history
  • Loading branch information
chirping78 authored and xiaoxiang781216 committed Dec 26, 2024
1 parent 0560a15 commit 8bb6712
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/xtensa/src/common/xtensa_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,11 @@ void up_enable_dcache(void)

/* Check if the D-Cache is enabled */

if ((memctl & MEMCTL_INV_EN) != 0)
if ((memctl & (MEMCTL_DCWA_MASK | MEMCTL_DCWU_MASK)) != 0)
{
return;
}

up_invalidate_dcache_all();

/* set ways allocatable & ways use */

memctl = memctl & ~(MEMCTL_DCWA_MASK | MEMCTL_DCWU_MASK);
Expand Down

0 comments on commit 8bb6712

Please sign in to comment.