Fix the SPIRAM_BANKSWITCH that was defined incorrectly

This commit is contained in:
Alan C. Assis
2020-11-18 11:50:20 -03:00
committed by Abdelatif Guettouche
parent e7c99480ea
commit 50e1a49c6e
3 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -591,7 +591,7 @@ config ESP32_SPIRAM_2T_MODE
Applications will not be affected unless the use the esp_himem Applications will not be affected unless the use the esp_himem
APIs, which are not supported in 2T mode. APIs, which are not supported in 2T mode.
config SPIRAM_BANKSWITCH_ENABLE config ESP32_SPIRAM_BANKSWITCH_ENABLE
bool "Enable bank switching for >4MiB external RAM" bool "Enable bank switching for >4MiB external RAM"
default y default y
help help
@@ -610,7 +610,7 @@ config SPIRAM_BANKSWITCH_ENABLE
config SPIRAM_BANKSWITCH_RESERVE config SPIRAM_BANKSWITCH_RESERVE
int "Amount of 32K pages to reserve for bank switching" int "Amount of 32K pages to reserve for bank switching"
depends on SPIRAM_BANKSWITCH_ENABLE depends on ESP32_SPIRAM_BANKSWITCH_ENABLE
default 8 default 8
range 1 62 range 1 62
help help
+1 -1
View File
@@ -70,7 +70,7 @@
/* How many 32KB pages will be reserved for bank switch */ /* How many 32KB pages will be reserved for bank switch */
#if CONFIG_SPIRAM_BANKSWITCH_ENABLE #if CONFIG_ESP32_SPIRAM_BANKSWITCH_ENABLE
# define SPIRAM_BANKSWITCH_RESERVE CONFIG_SPIRAM_BANKSWITCH_RESERVE # define SPIRAM_BANKSWITCH_RESERVE CONFIG_SPIRAM_BANKSWITCH_RESERVE
#else #else
# define SPIRAM_BANKSWITCH_RESERVE 0 # define SPIRAM_BANKSWITCH_RESERVE 0
@@ -143,7 +143,8 @@ int esp32_bringup(void)
#endif #endif
#if defined(CONFIG_ESP32_SPIRAM) #if defined(CONFIG_ESP32_SPIRAM) && \
defined(CONFIG_ESP32_SPIRAM_BANKSWITCH_ENABLE)
ret = esp_himem_init(); ret = esp_himem_init();
if (ret < 0) if (ret < 0)
{ {