mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-09-08 18:21:29 +01:00
lib: utils/cache: fix andes_llcache_enable() return value
The driver returned 1 on success where callers expect 0, so the suspend
to RAM aborted right after disabling the LLC and before flushing it.
Fixes: 82b0961821 ("lib: utils/cache: add Andes last level cache controller")
Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260728081041.2724668-2-ben717@andestech.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
committed by
Anup Patel
parent
27d9545384
commit
344428d832
Vendored
+4
-1
@@ -102,7 +102,10 @@ static int andes_llcache_enable(struct cache_device *dev, bool enable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
llcache_ctrl = readl(ctrl_addr);
|
llcache_ctrl = readl(ctrl_addr);
|
||||||
return enable == EXTRACT_FIELD(llcache_ctrl, LLCACHE_REG_CTRL_EN_MASK);
|
if (enable != EXTRACT_FIELD(llcache_ctrl, LLCACHE_REG_CTRL_EN_MASK))
|
||||||
|
return SBI_EFAIL;
|
||||||
|
|
||||||
|
return SBI_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct cache_ops andes_llcache_ops = {
|
static struct cache_ops andes_llcache_ops = {
|
||||||
|
|||||||
Reference in New Issue
Block a user