From 5336704c77b696248a9a6fb1050b94f5ac4c4e1c Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Mon, 27 Sep 2021 12:10:05 +0200 Subject: [PATCH] esp32_start.c: Initialize the SPI RAM before enabling its cache. Signed-off-by: Abdelatif Guettouche --- arch/xtensa/src/esp32/esp32_start.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/xtensa/src/esp32/esp32_start.c b/arch/xtensa/src/esp32/esp32_start.c index ee4ec46a3c..00fd8eb379 100644 --- a/arch/xtensa/src/esp32/esp32_start.c +++ b/arch/xtensa/src/esp32/esp32_start.c @@ -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 */