Skip to content

Commit

Permalink
soc/da1469x: Take PD_SYS control only once during initialization
Browse files Browse the repository at this point in the history
Take PD_SYS control only once during initialization

Signed-off-by: Ioannis Damigos <[email protected]>
  • Loading branch information
ydamigos authored and fabiobaltieri committed May 21, 2024
1 parent d308265 commit 8716b6a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions soc/renesas/smartbond/da1469x/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit 8716b6a

Please sign in to comment.