mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(cache): added cache invalidate all
This commit is contained in:
@@ -460,6 +460,21 @@ static inline void cache_ll_invalidate_addr(uint32_t cache_level, cache_type_t t
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Invalidate all cache
|
||||
*
|
||||
* Invalidate all cache
|
||||
*
|
||||
* @param cache_level level of the cache
|
||||
* @param type see `cache_type_t`
|
||||
* @param cache_id id of the cache in this type and level
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void cache_ll_invalidate_all(uint32_t cache_level, cache_type_t type, uint32_t cache_id)
|
||||
{
|
||||
Cache_Invalidate_All(CACHE_MAP_MASK);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Writeback
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
@@ -138,11 +138,7 @@ esp_err_t spi_flash_suspend_test_deinit(flash_test_handle_t *handle)
|
||||
|
||||
void spi_flash_suspend_test_invalidate_cache(void)
|
||||
{
|
||||
#if CONFIG_IDF_TARGET_ESP32S31
|
||||
Cache_Invalidate_All(CACHE_MAP_MASK);
|
||||
#else
|
||||
cache_ll_invalidate_all(CACHE_LL_LEVEL_ALL, CACHE_TYPE_ALL, CACHE_LL_ID_ALL);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // SOC_SPI_MEM_SUPPORT_AUTO_SUSPEND
|
||||
|
||||
Reference in New Issue
Block a user