mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
system: don't disable cache if Flash .text and .rodata are moved to PSRAM
This commit is contained in:
parent
96d03461ae
commit
0909f5b230
@ -22,6 +22,7 @@
|
||||
|
||||
#include "esp_private/spi_common_internal.h"
|
||||
|
||||
#define SPI_FLASH_CACHE_NO_DISABLE (CONFIG_SPI_FLASH_AUTO_SUSPEND || (CONFIG_SPIRAM_FETCH_INSTRUCTIONS && CONFIG_SPIRAM_RODATA))
|
||||
static const char TAG[] = "spi_flash";
|
||||
|
||||
/*
|
||||
@ -60,14 +61,14 @@ static inline bool on_spi1_check_yield(spi1_app_func_arg_t* ctx);
|
||||
|
||||
IRAM_ATTR static void cache_enable(void* arg)
|
||||
{
|
||||
#ifndef CONFIG_SPI_FLASH_AUTO_SUSPEND
|
||||
#if !SPI_FLASH_CACHE_NO_DISABLE
|
||||
spi_flash_enable_interrupts_caches_and_other_cpu();
|
||||
#endif
|
||||
}
|
||||
|
||||
IRAM_ATTR static void cache_disable(void* arg)
|
||||
{
|
||||
#ifndef CONFIG_SPI_FLASH_AUTO_SUSPEND
|
||||
#if !SPI_FLASH_CACHE_NO_DISABLE
|
||||
spi_flash_disable_interrupts_caches_and_other_cpu();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user