]> granicus.if.org Git - esp-idf/commitdiff
make psram workaround depend on chip revison
authorsuda-morris <362953310@qq.com>
Thu, 10 Oct 2019 03:38:14 +0000 (11:38 +0800)
committersuda-morris <362953310@qq.com>
Thu, 10 Oct 2019 03:38:14 +0000 (11:38 +0800)
Since ESP32 revision 3, the PSRAM workaround is not needed.

components/esp32/Kconfig

index 8c60767c60512392b08c54e9a9625cea1738bad0..9245420f5adde9c1e2c3f13315eba91632ab0ba6 100644 (file)
@@ -155,7 +155,7 @@ menu "ESP32-specific"
 
         config SPIRAM_CACHE_WORKAROUND
             bool "Enable workaround for bug in SPI RAM cache for Rev1 ESP32s"
-            depends on SPIRAM_USE_MEMMAP || SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC
+            depends on (SPIRAM_USE_MEMMAP || SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC) && (ESP32_REV_MIN < 3)
             default "y"
             help
                 Revision 1 of the ESP32 has a bug that can cause a write to PSRAM not to take place in some situations
@@ -166,6 +166,8 @@ menu "ESP32-specific"
                 This will also not use any bits of newlib that are located in ROM, opting for a version that is
                 compiled with the workaround and located in flash instead.
 
+                The workaround is not required for ESP32 revision 3 and above.
+
         config SPIRAM_BANKSWITCH_ENABLE
             bool "Enable bank switching for >4MiB external RAM"
             default y