cache: refactor cache_utils into cache_hal instade
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "hal/cache_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -39,6 +40,35 @@ void cache_hal_disable(cache_type_t type);
|
||||
*/
|
||||
void cache_hal_enable(cache_type_t type);
|
||||
|
||||
/**
|
||||
* @brief Suspend cache
|
||||
*
|
||||
* Suspend the ICache or DCache or both,suspends the CPU access to cache for a while, without invalidation.
|
||||
*
|
||||
* @param type see `cache_type_t`
|
||||
*
|
||||
* @return Current status of corresponding Cache(s)
|
||||
*/
|
||||
void cache_hal_suspend(cache_type_t type);
|
||||
|
||||
/**
|
||||
* @brief Resume cache
|
||||
*
|
||||
* Resume the ICache or DCache or both.
|
||||
*
|
||||
* @param type see `cache_type_t`
|
||||
*/
|
||||
void cache_hal_resume(cache_type_t type);
|
||||
|
||||
/**
|
||||
* @brief Check if corresponding cache is enabled or not
|
||||
*
|
||||
* @param type see `cache_type_t`
|
||||
*
|
||||
* @return true: enabled; false: disabled
|
||||
*/
|
||||
bool cache_hal_is_cache_enabled(cache_type_t type);
|
||||
|
||||
/**
|
||||
* @brief Invalidate cache supported addr
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user