mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-10-24 04:32:05 +01:00
lib: utils/cache: add cache enable function
Add functions to enable/disable the cache. Signed-off-by: Ben Zong-You Xie <ben717@andestech.com> Link: https://lore.kernel.org/r/20251229071914.1451587-4-ben717@andestech.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
1 parent
85bff9cc16
commit
6d26b43c47
4 files changed
+58
No files matched your search
Vendored
+11
@@ -44,3 +44,14 @@ int cache_flush_all(struct cache_device *dev)
|
||||
|
||||
return dev->ops->cache_flush_all(dev);
|
||||
}
|
||||
|
||||
int cache_enable(struct cache_device *dev, bool enable)
|
||||
{
|
||||
if (!dev)
|
||||
return SBI_ENODEV;
|
||||
|
||||
if (!dev->ops || !dev->ops->cache_enable)
|
||||
return SBI_ENOTSUPP;
|
||||
|
||||
return dev->ops->cache_enable(dev, enable);
|
||||
}
|
||||
Reference in new issue
Block a user