@@ -40,35 +40,7 @@ void ld_dvfs_init(void)
4040
4141 const struct dvfs_oppoint_data * opp_data = get_dvfs_oppoint_data (DVFS_FREQ_HIGH );
4242
43- #if defined(CONFIG_NRFS_LOCAL_DOMAIN_DVFS_TEST )
44- LOG_DBG ("%s" , __func__ );
45- LOG_DBG ("REGW: NRF_ABB->TRIM.RINGO[%d] 0x%x, V: 0x%x" ,
46- CURR_TARG_ABB_SLOT ,
47- (uint32_t )& NRF_ABB -> TRIM .RINGO [CURR_TARG_ABB_SLOT ],
48- opp_data -> abb_ringo );
49- LOG_DBG ("REGW: NRF_ABB->TRIM.LOCKRANGE[%d] 0x%x, V: 0x%x" ,
50- CURR_TARG_ABB_SLOT ,
51- (uint32_t )& NRF_ABB -> TRIM .LOCKRANGE [CURR_TARG_ABB_SLOT ],
52- opp_data -> abb_lockrange );
53- LOG_DBG ("REGW: NRF_ABB->TRIM.PVTMONCYCLES[%d] 0x%x, V: 0x%x" ,
54- CURR_TARG_ABB_SLOT ,
55- (uint32_t )& NRF_ABB -> TRIM .PVTMONCYCLES [CURR_TARG_ABB_SLOT ],
56- opp_data -> abb_pvtmoncycles );
57-
58- /*For app core.*/
59- LOG_DBG ("REGW: NRF_APPLICATION_ABB->TRIM.RINGO[%d] 0x%x, V: 0x%x" ,
60- CURR_TARG_ABB_SLOT ,
61- (uint32_t )& NRF_APPLICATION_ABB -> TRIM .RINGO [CURR_TARG_ABB_SLOT ],
62- opp_data -> abb_ringo );
63- LOG_DBG ("REGW: NRF_APPLICATION_ABB->TRIM.LOCKRANGE[%d] 0x%x, V: 0x%x" ,
64- CURR_TARG_ABB_SLOT ,
65- (uint32_t )& NRF_APPLICATION_ABB -> TRIM .LOCKRANGE [CURR_TARG_ABB_SLOT ],
66- opp_data -> abb_lockrange );
67- LOG_DBG ("REGW: NRF_APPLICATION_ABB->TRIM.PVTMONCYCLES[%d] 0x%x, V: 0x%x" ,
68- CURR_TARG_ABB_SLOT ,
69- (uint32_t )& NRF_APPLICATION_ABB -> TRIM .PVTMONCYCLES [CURR_TARG_ABB_SLOT ],
70- opp_data -> abb_pvtmoncycles );
71- #else
43+ #if !defined(CONFIG_NRFS_LOCAL_DOMAIN_DVFS_TEST )
7244 /* TODO: Change to NRFX Hal function when available. */
7345 NRF_ABB -> TRIM .RINGO [CURR_TARG_ABB_SLOT ] = opp_data -> abb_ringo ;
7446 NRF_ABB -> TRIM .LOCKRANGE [CURR_TARG_ABB_SLOT ] = opp_data -> abb_lockrange ;
@@ -84,12 +56,7 @@ void ld_dvfs_init(void)
8456void ld_dvfs_clear_zbb (void )
8557{
8658#if defined(NRF_SECURE )
87- #if defined(CONFIG_NRFS_LOCAL_DOMAIN_DVFS_TEST )
88- LOG_DBG ("%s" , __func__ );
89- LOG_DBG ("REGW: NRF_ABB->CONFIG.CTRL1.MODE 0x%x, V: 0x%x" ,
90- (uint32_t )& NRF_ABB -> CONFIG .CTRL1 ,
91- LD_ABB_CLR_ZBB );
92- #else
59+ #if !defined(CONFIG_NRFS_LOCAL_DOMAIN_DVFS_TEST )
9360 /* TODO: Change to NRFX Hal function when available. */
9461 NRF_ABB -> CONFIG .CTRL1 &= ~(ABB_CONFIG_CTRL1_MODE_Msk );
9562 NRF_APPLICATION_ABB -> CONFIG .CTRL1 &= ~(ABB_CONFIG_CTRL1_MODE_Msk );
@@ -161,34 +128,7 @@ void ld_dvfs_configure_abb_for_transition(enum dvfs_frequency_setting transient_
161128 const struct dvfs_oppoint_data * opp_data = get_dvfs_oppoint_data (transient_opp );
162129
163130#if defined(CONFIG_NRFS_LOCAL_DOMAIN_DVFS_TEST )
164- LOG_DBG ("%s" , __func__ );
165131 LOG_DBG ("transient_opp: %d, curr_targ_opp: %d" , transient_opp , curr_targ_opp );
166- LOG_DBG ("REGW: NRF_ABB->TRIM.RINGO[%d] 0x%x, V: 0x%x" ,
167- TRANSIENT_ZBB_ABB_SLOT ,
168- (uint32_t )& NRF_ABB -> TRIM .RINGO [TRANSIENT_ZBB_ABB_SLOT ],
169- opp_data -> abb_ringo );
170- LOG_DBG ("REGW: NRF_ABB->TRIM.LOCKRANGE[%d] 0x%x, V: 0x%x" ,
171- TRANSIENT_ZBB_ABB_SLOT ,
172- (uint32_t )& NRF_ABB -> TRIM .LOCKRANGE [TRANSIENT_ZBB_ABB_SLOT ],
173- opp_data -> abb_lockrange );
174- LOG_DBG ("REGW: NRF_ABB->TRIM.PVTMONCYCLES[%d] 0x%x, V: 0x%x" ,
175- TRANSIENT_ZBB_ABB_SLOT ,
176- (uint32_t )& NRF_ABB -> TRIM .PVTMONCYCLES [TRANSIENT_ZBB_ABB_SLOT ],
177- opp_data -> abb_pvtmoncycles );
178-
179- /* For app core.*/
180- LOG_DBG ("REGW: NRF_APPLICATION_ABB->TRIM.RINGO[%d] 0x%x, V: 0x%x" ,
181- TRANSIENT_ZBB_ABB_SLOT ,
182- (uint32_t )& NRF_APPLICATION_ABB -> TRIM .RINGO [TRANSIENT_ZBB_ABB_SLOT ],
183- opp_data -> abb_ringo );
184- LOG_DBG ("REGW: NRF_APPLICATION_ABB->TRIM.LOCKRANGE[%d] 0x%x, V: 0x%x" ,
185- TRANSIENT_ZBB_ABB_SLOT ,
186- (uint32_t )& NRF_APPLICATION_ABB -> TRIM .LOCKRANGE [TRANSIENT_ZBB_ABB_SLOT ],
187- opp_data -> abb_lockrange );
188- LOG_DBG ("REGW: NRF_APPLICATION_ABB->TRIM.PVTMONCYCLES[%d] 0x%x, V: 0x%x" ,
189- TRANSIENT_ZBB_ABB_SLOT ,
190- (uint32_t )& NRF_APPLICATION_ABB -> TRIM .PVTMONCYCLES [TRANSIENT_ZBB_ABB_SLOT ],
191- opp_data -> abb_pvtmoncycles );
192132#else
193133
194134 NRF_ABB -> TRIM .RINGO [TRANSIENT_ZBB_ABB_SLOT ] = opp_data -> abb_ringo ;
@@ -201,42 +141,8 @@ void ld_dvfs_configure_abb_for_transition(enum dvfs_frequency_setting transient_
201141#endif
202142 opp_data = get_dvfs_oppoint_data (curr_targ_opp );
203143
204- #if defined(CONFIG_NRFS_LOCAL_DOMAIN_DVFS_TEST )
205- LOG_DBG ("REGW: NRF_ABB->TRIM.RINGO[%d] 0x%x, V: 0x%x" ,
206- CURR_TARG_ABB_SLOT ,
207- (uint32_t )& NRF_ABB -> TRIM .RINGO [CURR_TARG_ABB_SLOT ],
208- opp_data -> abb_ringo );
209- LOG_DBG ("REGW: NRF_ABB->TRIM.LOCKRANGE[%d] 0x%x, V: 0x%x" ,
210- CURR_TARG_ABB_SLOT ,
211- (uint32_t )& NRF_ABB -> TRIM .LOCKRANGE [CURR_TARG_ABB_SLOT ],
212- opp_data -> abb_lockrange );
213- LOG_DBG ("REGW: NRF_ABB->TRIM.PVTMONCYCLES[%d] 0x%x, V: 0x%x" ,
214- CURR_TARG_ABB_SLOT ,
215- (uint32_t )& NRF_ABB -> TRIM .PVTMONCYCLES [CURR_TARG_ABB_SLOT ],
216- opp_data -> abb_pvtmoncycles );
217-
218- LOG_DBG ("REGW: TODO: NRF_ABB->CONFIG.CTRL4 0x%x, V: 0x%lx" ,
219- (uint32_t )& NRF_ABB -> CONFIG .CTRL4 ,
220- LD_ABB_CTRL4_TRANSITION_OPERATION );
221-
222- /* For app core */
223- LOG_DBG ("REGW: NRF_APPLICATION_ABB->TRIM.RINGO[%d] 0x%x, V: 0x%x" ,
224- CURR_TARG_ABB_SLOT ,
225- (uint32_t )& NRF_APPLICATION_ABB -> TRIM .RINGO [CURR_TARG_ABB_SLOT ],
226- opp_data -> abb_ringo );
227- LOG_DBG ("REGW: NRF_APPLICATION_ABB->TRIM.LOCKRANGE[%d] 0x%x, V: 0x%x" ,
228- CURR_TARG_ABB_SLOT ,
229- (uint32_t )& NRF_APPLICATION_ABB -> TRIM .LOCKRANGE [CURR_TARG_ABB_SLOT ],
230- opp_data -> abb_lockrange );
231- LOG_DBG ("REGW: NRF_APPLICATION_ABB->TRIM.PVTMONCYCLES[%d] 0x%x, V: 0x%x" ,
232- CURR_TARG_ABB_SLOT ,
233- (uint32_t )& NRF_APPLICATION_ABB -> TRIM .PVTMONCYCLES [CURR_TARG_ABB_SLOT ],
234- opp_data -> abb_pvtmoncycles );
235-
236- LOG_DBG ("REGW: TODO: NRF_APPLICATION_ABB->CONFIG.CTRL4 0x%x, V: 0x%lx" ,
237- (uint32_t )& NRF_APPLICATION_ABB -> CONFIG .CTRL4 ,
238- LD_ABB_CTRL4_TRANSITION_OPERATION );
239- #else
144+ #if !defined(CONFIG_NRFS_LOCAL_DOMAIN_DVFS_TEST )
145+
240146 NRF_ABB -> TRIM .RINGO [CURR_TARG_ABB_SLOT ] = opp_data -> abb_ringo ;
241147 NRF_ABB -> TRIM .LOCKRANGE [CURR_TARG_ABB_SLOT ] = opp_data -> abb_lockrange ;
242148 NRF_ABB -> TRIM .PVTMONCYCLES [CURR_TARG_ABB_SLOT ] = opp_data -> abb_pvtmoncycles ;
@@ -281,22 +187,6 @@ int32_t ld_dvfs_configure_hsfll(enum dvfs_frequency_setting oppoint)
281187
282188#if defined(CONFIG_NRFS_LOCAL_DOMAIN_DVFS_TEST )
283189 LOG_DBG ("%s oppoint: %d" , __func__ , oppoint );
284- LOG_DBG ("REGW: NRF_HSFLL->MIRROR 0x%x, V: 0x%x" , (uint32_t )& NRF_HSFLL -> MIRROR , 1 );
285- LOG_DBG ("REGW: NRF_HSFLL->TRIM.COARSE 0x%x, V: 0x%x" ,
286- (uint32_t )& NRF_HSFLL -> TRIM .COARSE ,
287- hsfll_trim .coarse );
288- LOG_DBG ("REGW: NRF_HSFLL->TRIM.FINE 0x%x, V: 0x%x" ,
289- (uint32_t )& NRF_HSFLL -> TRIM .FINE ,
290- hsfll_trim .fine );
291- LOG_DBG ("REGW: NRF_HSFLL->MIRROR 0x%x, V: 0x%x" , (uint32_t )& NRF_HSFLL -> MIRROR , 0 );
292-
293- LOG_DBG ("REGW: NRF_HSFLL->CLOCKCTRL.MULT 0x%x, V: 0x%x" ,
294- (uint32_t )& NRF_HSFLL -> CLOCKCTRL .MULT ,
295- get_dvfs_oppoint_data (oppoint )-> new_f_mult );
296-
297- LOG_DBG ("REGW: NRF_HSFLL->NRF_HSFLL_TASK_FREQ_CHANGE 0x%x, V: 0x%x" ,
298- (uint32_t )NRF_HSFLL + NRF_HSFLL_TASK_FREQ_CHANGE ,
299- 0x1 );
300190 return 0 ;
301191#else
302192
@@ -337,15 +227,7 @@ void ld_dvfs_scaling_background_process(bool downscaling)
337227void ld_dvfs_scaling_finish (bool downscaling )
338228{
339229#if defined(NRF_SECURE )
340- #if defined(CONFIG_NRFS_LOCAL_DOMAIN_DVFS_TEST )
341- LOG_DBG ("%s" , __func__ );
342- LOG_DBG ("REGW: NRF_ABB->CONFIG.CTRL4 0x%x, V: 0x%lx" ,
343- (uint32_t )& NRF_ABB -> CONFIG .CTRL4 ,
344- LD_ABB_CTRL4_NORMAL_OPERATION );
345- LOG_DBG ("REGW: NRF_APPLICATION_ABB->CONFIG.CTRL4 0x%x, V: 0x%lx" ,
346- (uint32_t )& NRF_APPLICATION_ABB -> CONFIG .CTRL4 ,
347- LD_ABB_CTRL4_NORMAL_OPERATION );
348- #else
230+ #if !defined(CONFIG_NRFS_LOCAL_DOMAIN_DVFS_TEST )
349231 NRF_ABB -> CONFIG .CTRL4 = LD_ABB_CTRL4_NORMAL_OPERATION ;
350232 NRF_APPLICATION_ABB -> CONFIG .CTRL4 = LD_ABB_CTRL4_NORMAL_OPERATION ;
351233#endif
0 commit comments