Skip to content

Commit 24322c6

Browse files
lstnldanieldegrasse
authored andcommitted
drivers: nrf_ironside: dvfs abb analog status workaround
Until register ABB->STATUSANA is visible it must be checked using defined offset to base ABB register. Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
1 parent b15404f commit 24322c6

File tree

1 file changed

+12
-1
lines changed
  • drivers/firmware/nrf_ironside

1 file changed

+12
-1
lines changed

drivers/firmware/nrf_ironside/dvfs.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010

1111
static enum ironside_dvfs_oppoint current_dvfs_oppoint = IRONSIDE_DVFS_OPP_HIGH;
1212

13+
#if defined(CONFIG_SOC_SERIES_NRF54HX)
14+
#define ABB_STATUSANA_LOCKED_L_Pos (0UL)
15+
#define ABB_STATUSANA_LOCKED_L_Msk (0x1UL << ABB_STATUSANA_LOCKED_L_Pos)
16+
#define ABB_STATUSANA_REG_OFFSET (0x102UL)
17+
#else
18+
#error "Unsupported SoC series for IRONside DVFS"
19+
#endif
20+
1321
struct dvfs_hsfll_data_t {
1422
uint32_t new_f_mult;
1523
uint32_t new_f_trim_entry;
@@ -118,7 +126,10 @@ static void ironside_dvfs_change_oppoint_complete(enum ironside_dvfs_oppoint dvf
118126
static inline bool ironside_dvfs_is_abb_locked(NRF_ABB_Type *abb)
119127
{
120128
/* Check if ABB analog part is locked. */
121-
return ((abb->STATUSANA & ABB_STATUSANA_LOCKED_Msk) != 0);
129+
/* Temporary workaround until STATUSANA register is visible. */
130+
volatile const uint32_t *statusana = (uint32_t *)abb + ABB_STATUSANA_REG_OFFSET;
131+
132+
return ((*statusana & ABB_STATUSANA_LOCKED_L_Msk) != 0);
122133
}
123134

124135
/**

0 commit comments

Comments
 (0)