Skip to content

Commit 1f2464f

Browse files
tervonenjakartben
authored andcommitted
Revert "drivers: clock_control: Add handling of missing NRF_BICR LFOSC modes"
This reverts commit 36ce7ae. Signed-off-by: Jari Tervonen <jari.tervonen@nordicsemi.no>
1 parent 1fe1207 commit 1f2464f

1 file changed

Lines changed: 3 additions & 25 deletions

File tree

drivers/clock_control/clock_control_nrf_lfclk.c

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,8 @@ static int lfclk_init(const struct device *dev)
332332

333333
lfosc_mode = nrf_bicr_lfosc_mode_get(BICR);
334334

335-
if (lfosc_mode == NRF_BICR_LFOSC_MODE_UNCONFIGURED
336-
#if NRF_BICR_HAS_LFOSC_LFXOCONFIG_DISABLED
337-
|| lfosc_mode == NRF_BICR_LFOSC_MODE_DISABLED
338-
#endif
339-
) {
335+
if (lfosc_mode == NRF_BICR_LFOSC_MODE_UNCONFIGURED ||
336+
lfosc_mode == NRF_BICR_LFOSC_MODE_DISABLED) {
340337
dev_data->max_accuracy = LFCLK_HFXO_ACCURACY;
341338
} else {
342339
ret = lfosc_get_accuracy(&dev_data->max_accuracy);
@@ -346,7 +343,6 @@ static int lfclk_init(const struct device *dev)
346343
}
347344

348345
switch (lfosc_mode) {
349-
#if NRF_BICR_HAS_LFOSC_LFXOCONFIG_CRYSTAL
350346
case NRF_BICR_LFOSC_MODE_CRYSTAL:
351347
clock_option = &clock_options[dev_data->clock_options_cnt];
352348
clock_option->accuracy = dev_data->max_accuracy;
@@ -360,25 +356,7 @@ static int lfclk_init(const struct device *dev)
360356
clock_option->src = NRFS_CLOCK_SRC_LFCLK_XO_PIERCE_HP;
361357
dev_data->clock_options_cnt++;
362358
break;
363-
#endif
364-
#if NRF_BICR_HAS_LFOSC_LFXOCONFIG_PIERCE
365-
case NRF_BICR_LFOSC_MODE_PIERCE:
366-
clock_option = &clock_options[dev_data->clock_options_cnt];
367-
clock_option->accuracy = dev_data->max_accuracy;
368-
clock_option->precision = 0;
369-
clock_option->src = NRFS_CLOCK_SRC_LFCLK_XO_PIERCE;
370-
dev_data->clock_options_cnt++;
371-
break;
372-
#endif
373-
#if NRF_BICR_HAS_LFOSC_LFXOCONFIG_PIXO
374-
case NRF_BICR_LFOSC_MODE_PIXO:
375-
clock_option = &clock_options[dev_data->clock_options_cnt];
376-
clock_option->accuracy = dev_data->max_accuracy;
377-
clock_option->precision = 0;
378-
clock_option->src = NRFS_CLOCK_SRC_LFCLK_XO_PIXO;
379-
dev_data->clock_options_cnt++;
380-
break;
381-
#endif
359+
382360
case NRF_BICR_LFOSC_MODE_EXTSINE:
383361
clock_option = &clock_options[dev_data->clock_options_cnt];
384362
clock_option->accuracy = dev_data->max_accuracy;

0 commit comments

Comments
 (0)