From 8716b6a9004ab01b68b993be0b33c66ef6e473ef Mon Sep 17 00:00:00 2001 From: Ioannis Damigos Date: Fri, 17 May 2024 16:01:27 +0300 Subject: [PATCH] soc/da1469x: Take PD_SYS control only once during initialization Take PD_SYS control only once during initialization Signed-off-by: Ioannis Damigos --- soc/renesas/smartbond/da1469x/soc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/soc/renesas/smartbond/da1469x/soc.c b/soc/renesas/smartbond/da1469x/soc.c index 28a21d3aa8f3fc..a6626aa9598afc 100644 --- a/soc/renesas/smartbond/da1469x/soc.c +++ b/soc/renesas/smartbond/da1469x/soc.c @@ -146,9 +146,6 @@ static int renesas_da1469x_init(void) CRG_TOP_PMU_CTRL_REG_COM_SLEEP_Msk | CRG_TOP_PMU_CTRL_REG_RADIO_SLEEP_Msk); - /* 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; @@ -167,15 +164,19 @@ static int renesas_da1469x_init(void) CRG_TOP_BOD_CTRL_REG_BOD_V30_EN_Msk | CRG_TOP_BOD_CTRL_REG_BOD_VBAT_EN_Msk); - da1469x_pdc_reset(); - da1469x_otp_init(); da1469x_trimv_init_from_otp(); da1469x_pd_init(); + + /* + * Take PD_SYS control. + */ da1469x_pd_acquire(MCU_PD_DOMAIN_SYS); da1469x_pd_acquire(MCU_PD_DOMAIN_TIM); + da1469x_pdc_reset(); + return 0; }