From 80c5f72fe26f44031414d3848e924623bfa8a00e Mon Sep 17 00:00:00 2001 From: Andrzej Kaczmarek Date: Wed, 7 Jun 2023 15:42:47 +0200 Subject: [PATCH] soc: arm: smartbond: Enable cache retainability in sleep This enables cache retainability while in sleep so there's no penalty when executing from QSPI after wakeup. Signed-off-by: Andrzej Kaczmarek --- soc/renesas/smartbond/da1469x/soc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/soc/renesas/smartbond/da1469x/soc.c b/soc/renesas/smartbond/da1469x/soc.c index 2d458ca050..8d6a23a2d9 100644 --- a/soc/renesas/smartbond/da1469x/soc.c +++ b/soc/renesas/smartbond/da1469x/soc.c @@ -149,6 +149,11 @@ static int renesas_da1469x_init(void) /* PDC should take care of PD_SYS */ CRG_TOP->PMU_CTRL_REG &= ~CRG_TOP_PMU_CTRL_REG_SYS_SLEEP_Msk; +#if defined(CONFIG_PM) + /* Enable cache retainability */ + CRG_TOP->PMU_CTRL_REG |= CRG_TOP_PMU_CTRL_REG_RETAIN_CACHE_Msk; +#endif + /* * Due to crosstalk issues any power rail can potentially * issue a fake event. This is typically observed upon