|
|
@@ -287,6 +287,9 @@ static void IRAM_ATTR spi_flash_restore_cache(uint32_t cpuid, uint32_t saved_sta
|
|
|
|
|
|
IRAM_ATTR bool spi_flash_cache_enabled()
|
|
|
{
|
|
|
- return DPORT_REG_GET_BIT(DPORT_PRO_CACHE_CTRL_REG, DPORT_PRO_CACHE_ENABLE)
|
|
|
- && DPORT_REG_GET_BIT(DPORT_APP_CACHE_CTRL_REG, DPORT_APP_CACHE_ENABLE);
|
|
|
+ bool result = (DPORT_REG_GET_BIT(DPORT_PRO_CACHE_CTRL_REG, DPORT_PRO_CACHE_ENABLE) != 0);
|
|
|
+#if portNUM_PROCESSORS == 2
|
|
|
+ result = result && (DPORT_REG_GET_BIT(DPORT_APP_CACHE_CTRL_REG, DPORT_APP_CACHE_ENABLE) != 0);
|
|
|
+#endif
|
|
|
+ return result;
|
|
|
}
|