From 0d6380feb36d7114af2ba44809e7ee381e049779 Mon Sep 17 00:00:00 2001 From: Aksel Skauge Mellbye Date: Wed, 2 Oct 2024 22:39:06 +0200 Subject: [PATCH] drivers: timer: gecko: Remove clock configuration Clock setup is now done by the clock manager based on device tree configuration. Signed-off-by: Aksel Skauge Mellbye --- .../dev_kits/sltb010a/sltb010a_defconfig | 1 - .../xg27_dk2602a/xg27_dk2602a_defconfig | 1 - .../xg24_rb4187c/xg24_rb4187c_defconfig | 1 - drivers/timer/gecko_burtc_timer.c | 11 ------- soc/silabs/Kconfig | 31 ------------------- 5 files changed, 45 deletions(-) diff --git a/boards/silabs/dev_kits/sltb010a/sltb010a_defconfig b/boards/silabs/dev_kits/sltb010a/sltb010a_defconfig index 50a14221ec99e98..8058f75f5d1a9d5 100644 --- a/boards/silabs/dev_kits/sltb010a/sltb010a_defconfig +++ b/boards/silabs/dev_kits/sltb010a/sltb010a_defconfig @@ -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 diff --git a/boards/silabs/dev_kits/xg27_dk2602a/xg27_dk2602a_defconfig b/boards/silabs/dev_kits/xg27_dk2602a/xg27_dk2602a_defconfig index 50a14221ec99e98..8058f75f5d1a9d5 100644 --- a/boards/silabs/dev_kits/xg27_dk2602a/xg27_dk2602a_defconfig +++ b/boards/silabs/dev_kits/xg27_dk2602a/xg27_dk2602a_defconfig @@ -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 diff --git a/boards/silabs/radio_boards/xg24_rb4187c/xg24_rb4187c_defconfig b/boards/silabs/radio_boards/xg24_rb4187c/xg24_rb4187c_defconfig index 7e41ebc6a13c019..4bc5ac3c06f84a6 100644 --- a/boards/silabs/radio_boards/xg24_rb4187c/xg24_rb4187c_defconfig +++ b/boards/silabs/radio_boards/xg24_rb4187c/xg24_rb4187c_defconfig @@ -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 diff --git a/drivers/timer/gecko_burtc_timer.c b/drivers/timer/gecko_burtc_timer.c index 110efa5f928e305..cd004f223fd8541 100644 --- a/drivers/timer/gecko_burtc_timer.c +++ b/drivers/timer/gecko_burtc_timer.c @@ -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; diff --git a/soc/silabs/Kconfig b/soc/silabs/Kconfig index c5a87b19c961230..c0597509fe0623f 100644 --- a/soc/silabs/Kconfig +++ b/soc/silabs/Kconfig @@ -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