Skip to content

Commit

Permalink
esp32: fix seemingly wrong calculations
Browse files Browse the repository at this point in the history
DPORT_APP_CACHE_MASK_DRAM1 is already a mask.
  • Loading branch information
yamt committed Sep 2, 2024
1 parent 63ed723 commit 690d507
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/xtensa/src/esp32/esp32_spiram.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void IRAM_ATTR esp_spiram_init_cache(void)
cache_flush(APP_CPU_NUM);
cache_read_enable(APP_CPU_NUM);
regval = getreg32(DPORT_APP_CACHE_CTRL1_REG);
regval &= ~(1 << DPORT_APP_CACHE_MASK_DRAM1);
regval &= ~DPORT_APP_CACHE_MASK_DRAM1;
putreg32(regval, DPORT_APP_CACHE_CTRL1_REG);
cache_sram_mmu_set(1, 0, SOC_EXTRAM_DATA_LOW, 0, 32, 128);
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/src/esp32/esp32_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static noinline_function IRAM_ATTR void configure_sram_mmu(void)

#ifdef CONFIG_SMP
regval = getreg32(DPORT_APP_CACHE_CTRL1_REG);
regval &= ~(1 << DPORT_APP_CACHE_MASK_DRAM1);
regval &= ~DPORT_APP_CACHE_MASK_DRAM1;
putreg32(regval, DPORT_APP_CACHE_CTRL1_REG);
ASSERT(cache_sram_mmu_set(1, PIDCTRL_PID_KERNEL, SOC_EXTRAM_DATA_LOW, 0,
32, 128) == 0);
Expand Down

0 comments on commit 690d507

Please sign in to comment.