feat(esp_rom): do not patch Cache_WriteBack_All for uboot build

This commit is contained in:
wanglei
2026-05-22 11:53:50 +08:00
parent 85f79ecb07
commit 733a5e5d02
2 changed files with 8 additions and 0 deletions
@@ -31,6 +31,7 @@ int Cache_WriteBack_Addr(uint32_t addr, uint32_t size)
return 0;
}
#ifndef BOOTLOADER_BUILD
void Cache_WriteBack_All(void)
{
REG_WRITE(CACHE_SYNC_MAP_REG, CACHE_MAP_FLASH_CACHE);
@@ -42,6 +43,7 @@ void Cache_WriteBack_All(void)
REG_WRITE(CACHE_SYNC_CTRL_REG, CACHE_WRITEBACK_ENA);
while (!REG_GET_BIT(CACHE_SYNC_CTRL_REG, CACHE_SYNC_DONE));
}
#endif
int Cache_WriteBack_Invalidate_Addr(uint32_t addr, uint32_t size)
{
@@ -49,6 +49,11 @@ int Cache_WriteBack_Addr(uint32_t map, uint32_t addr, uint32_t size)
return 0;
}
#ifndef BOOTLOADER_BUILD
/**
* ci build no test related case will check backtrace not call functions from .iram.text
* so for bootloader still use the rom function. The issue will not occur in uboot stage
*/
int Cache_WriteBack_All(uint32_t map)
{
/* writeback readonly cache is invalid */
@@ -71,6 +76,7 @@ int Cache_WriteBack_All(uint32_t map)
return 0;
}
#endif
int Cache_WriteBack_Invalidate_Addr(uint32_t map, uint32_t addr, uint32_t size)
{