Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5678512

Browse files
sylvioalvesmmahadevan108
authored andcommittedOct 28, 2024·
soc: esp32s3: move cache mode call
Removed unused function declaration. Added missing include. Move Cache_Susped_DCache() call to proper function configuration call. Signed-off-by: Sylvio Alves <[email protected]>
1 parent 02fc5e3 commit 5678512

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed
 

‎soc/espressif/esp32s3/soc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <esp_private/esp_mmu_map_private.h>
1717
#include <esp_private/mspi_timing_tuning.h>
1818
#include <esp_flash_internal.h>
19+
#include <esp_private/cache_utils.h>
1920
#include <sdkconfig.h>
2021

2122
#if CONFIG_ESP_SPIRAM

‎soc/espressif/esp32s3/soc.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,4 @@ extern int esp_rom_Cache_Ibus_MMU_Set(uint32_t ext_ram, uint32_t vaddr, uint32_t
7373
extern uint8_t esp_rom_i2c_readReg(uint8_t block, uint8_t host_id, uint8_t reg_add);
7474
extern void esp_rom_i2c_writeReg(uint8_t block, uint8_t host_id, uint8_t reg_add, uint8_t data);
7575

76-
/* cache initialization functions */
77-
void esp_config_instruction_cache_mode(void);
78-
void esp_config_data_cache_mode(void);
79-
8076
#endif /* __SOC_H__ */

‎soc/espressif/esp32s3/soc_cache.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ void IRAM_ATTR esp_config_instruction_cache_mode(void)
2626
rom_config_instruction_cache_mode(CONFIG_ESP32S3_INSTRUCTION_CACHE_SIZE,
2727
CONFIG_ESP32S3_ICACHE_ASSOCIATED_WAYS,
2828
CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_SIZE);
29-
30-
Cache_Suspend_DCache();
3129
}
3230

3331
void IRAM_ATTR esp_config_data_cache_mode(void)
3432
{
33+
Cache_Suspend_DCache();
3534
rom_config_data_cache_mode(CONFIG_ESP32S3_DATA_CACHE_SIZE,
3635
CONFIG_ESP32S3_DCACHE_ASSOCIATED_WAYS,
3736
CONFIG_ESP32S3_DATA_CACHE_LINE_SIZE);

0 commit comments

Comments
 (0)
Please sign in to comment.