mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-11 07:18:58 +00:00
[feat][l1c] update flush cache external api
This commit is contained in:
parent
34a81fbe16
commit
93c8f3dd23
2 changed files with 25 additions and 0 deletions
|
@ -173,6 +173,7 @@ void L1C_BMX_TO_IRQHandler(void);
|
|||
BL_Err_Type L1C_Cache_Enable_Set(uint8_t wayDisable);
|
||||
void L1C_Cache_Write_Set(BL_Fun_Type wtEn, BL_Fun_Type wbEn, BL_Fun_Type waEn);
|
||||
BL_Err_Type L1C_Cache_Flush(uint8_t wayDisable);
|
||||
BL_Err_Type L1C_Cache_Flush_Ext(void);
|
||||
void L1C_Cache_Hit_Count_Get(uint32_t *hitCountLow, uint32_t *hitCountHigh);
|
||||
uint32_t L1C_Cache_Miss_Count_Get(void);
|
||||
void L1C_Cache_Read_Disable(void);
|
||||
|
|
|
@ -248,6 +248,30 @@ BL_Err_Type ATTR_TCM_SECTION L1C_Cache_Flush(uint8_t wayDisable)
|
|||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************/ /**
|
||||
* @brief Flush cache external api
|
||||
*
|
||||
* @param None
|
||||
*
|
||||
* @return SUCCESS or ERROR
|
||||
*
|
||||
*******************************************************************************/
|
||||
BL_Err_Type ATTR_TCM_SECTION L1C_Cache_Flush_Ext(void)
|
||||
{
|
||||
uint32_t tmpVal;
|
||||
|
||||
/* Disable early respone */
|
||||
tmpVal = BL_RD_REG(L1C_BASE, L1C_CONFIG);
|
||||
L1C_Cache_Flush((tmpVal >> L1C_WAY_DIS_POS) & 0xf);
|
||||
__NOP();
|
||||
__NOP();
|
||||
__NOP();
|
||||
__NOP();
|
||||
__NOP();
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/****************************************************************************/ /**
|
||||
* @brief Get cache hit count
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue