diff options
| author | Rick Chen <[email protected]> | 2019-08-28 18:46:04 +0800 |
|---|---|---|
| committer | Andes <[email protected]> | 2019-09-03 09:31:03 +0800 |
| commit | 4d0140ee1aa02c702846f47fe986a19ecc4318a6 (patch) | |
| tree | 3c0c5ac104f2e1c137dabf2064cf041fb545051b /include/cache.h | |
| parent | d58b0a6ee10710b259412fdeaf0eb24474af8401 (diff) | |
dm: cache: Add enable and disable ops for cache uclass
Add cache enable/disable ops to the DM cache uclass driver
Signed-off-by: Rick Chen <[email protected]>
Cc: KC Lin <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Diffstat (limited to 'include/cache.h')
| -rw-r--r-- | include/cache.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/cache.h b/include/cache.h index c6334ca27fb..32f59fd8f71 100644 --- a/include/cache.h +++ b/include/cache.h @@ -22,6 +22,22 @@ struct cache_ops { * @return 0 if OK, -ve on error */ int (*get_info)(struct udevice *dev, struct cache_info *info); + + /** + * enable() - Enable cache + * + * @dev: Device to check (UCLASS_CACHE) + * @return 0 if OK, -ve on error + */ + int (*enable)(struct udevice *dev); + + /** + * disable() - Flush and disable cache + * + * @dev: Device to check (UCLASS_CACHE) + * @return 0 if OK, -ve on error + */ + int (*disable)(struct udevice *dev); }; #define cache_get_ops(dev) ((struct cache_ops *)(dev)->driver->ops) @@ -35,4 +51,19 @@ struct cache_ops { */ int cache_get_info(struct udevice *dev, struct cache_info *info); +/** + * cache_enable() - Enable cache + * + * @dev: Device to check (UCLASS_CACHE) + * @return 0 if OK, -ve on error + */ +int cache_enable(struct udevice *dev); + +/** + * cache_disable() - Flush and disable cache + * + * @dev: Device to check (UCLASS_CACHE) + * @return 0 if OK, -ve on error + */ +int cache_disable(struct udevice *dev); #endif |
