Skip to content

Commit

Permalink
drivers: timer: gecko: Remove clock configuration
Browse files Browse the repository at this point in the history
Clock setup is now done by the clock manager based
on device tree configuration.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
  • Loading branch information
asmellby committed Oct 4, 2024
1 parent abc98ae commit 0d6380f
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 45 deletions.
1 change: 0 additions & 1 deletion boards/silabs/dev_kits/sltb010a/sltb010a_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=76800000

# Use BURTC as system clock source
CONFIG_GECKO_BURTC_TIMER=y
CONFIG_CMU_BURTCCLK_LFXO=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1024
1 change: 0 additions & 1 deletion boards/silabs/dev_kits/xg27_dk2602a/xg27_dk2602a_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=76800000

# Use BURTC as system clock source
CONFIG_GECKO_BURTC_TIMER=y
CONFIG_CMU_BURTCCLK_LFXO=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1024
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ CONFIG_PINCTRL=y

# Use BURTC as system clock source
CONFIG_GECKO_BURTC_TIMER=y
CONFIG_CMU_BURTCCLK_LFXO=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1024
11 changes: 0 additions & 11 deletions drivers/timer/gecko_burtc_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,6 @@ static int burtc_init(void)
/* Enable clock for BURTC CSRs on APB */
CMU_ClockEnable(cmuClock_BURTC, true);

/* Configure BURTC LF clocksource according to Kconfig */
#if defined(CONFIG_CMU_BURTCCLK_LFXO)
CMU_ClockSelectSet(cmuClock_BURTC, cmuSelect_LFXO);
#elif defined(CONFIG_CMU_BURTCCLK_LFRCO)
CMU_ClockSelectSet(cmuClock_BURTC, cmuSelect_LFRCO);
#elif defined(CONFIG_CMU_BURTCCLK_ULFRCO)
CMU_ClockSelectSet(cmuClock_BURTC, cmuSelect_ULFRCO);
#else
#error "Unsupported BURTC clock specified"
#endif

/* Calculate timing constants and init BURTC */
hw_clock_freq = CMU_ClockFreqGet(cmuClock_BURTC);
z_clock_hw_cycles_per_sec = hw_clock_freq;
Expand Down
31 changes: 0 additions & 31 deletions soc/silabs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -216,37 +216,6 @@ config CMU_HFCLK_HFRCO

endchoice


choice
prompt "BURTC Clock Selection"
depends on SOC_GECKO_BURTC
default CMU_BURTCCLK_LFRCO

config CMU_BURTCCLK_LFXO
bool "LFXO - external low frequency crystal oscillator"
select CMU_NEED_LFXO
help
Set this option to use LFXO - the external low freqency crystal oscillator
as BURTC clock.
Frequency is set by external crystal, typically 32.768 kHz.

config CMU_BURTCCLK_LFRCO
bool "LFRCO - internal low frequency RC oscillator"
help
Set this option to use LFRCO - the internal low freqency RC oscillator
as BURTC clock.
Frequency is approximately 32.768 kHz.

config CMU_BURTCCLK_ULFRCO
bool "ULFRCO - internal ultra low frequency RC oscillator"
help
Set this option to use ULFRCO - the external low freqency crystal oscillator
as BURTC clock.
Frequency is approximately 1 kHz.

endchoice


config CMU_HFXO_FREQ
int "External high frequency oscillator frequency"
help
Expand Down

0 comments on commit 0d6380f

Please sign in to comment.