esp32_start.c: Initialize the SPI RAM before enabling its cache.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
Abdelatif Guettouche 2021-09-27 12:10:05 +02:00 committed by Xiang Xiao
parent ea42f84d9a
commit 5336704c77

View File

@ -201,7 +201,6 @@ static noreturn_function void __esp32_start(void)
showprogress("A");
#if defined(CONFIG_ESP32_SPIRAM_BOOT_INIT)
esp_spiram_init_cache();
if (esp_spiram_init() != OK)
{
# if defined(ESP32_SPIRAM_IGNORE_NOTFOUND)
@ -210,6 +209,10 @@ static noreturn_function void __esp32_start(void)
PANIC();
# endif
}
else
{
esp_spiram_init_cache();
}
/* Set external memory bss section to zero */