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:
Ben Zong-You Xie
2026-09-01 10:46:23 +05:30
committed by Anup Patel
parent 27d9545384
commit 344428d832
+4 -1
View File
@@ -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 = {