From 0267bfe093de73de204f73be789b11b5f154d9ab Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sat, 8 Jul 2023 12:11:06 +0200 Subject: [PATCH] arch/nrf91/clock: various fixes for LFCLK --- arch/arm/src/nrf91/Kconfig | 3 --- arch/arm/src/nrf91/hardware/nrf91_clock.h | 6 +++--- arch/arm/src/nrf91/nrf91_clockconfig.c | 9 --------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/arch/arm/src/nrf91/Kconfig b/arch/arm/src/nrf91/Kconfig index 4e01fe3481..d9415a9905 100644 --- a/arch/arm/src/nrf91/Kconfig +++ b/arch/arm/src/nrf91/Kconfig @@ -382,9 +382,6 @@ config NRF91_LFCLK_XTAL config NRF91_LFCLK_RC bool "Internal RC oscillator" -config NRF91_LFCLK_SYNTH - bool "Synthesized from HFCLK" - endchoice endif # NRF91_USE_LFCLK diff --git a/arch/arm/src/nrf91/hardware/nrf91_clock.h b/arch/arm/src/nrf91/hardware/nrf91_clock.h index fbe2046e10..0c5350d22e 100644 --- a/arch/arm/src/nrf91/hardware/nrf91_clock.h +++ b/arch/arm/src/nrf91/hardware/nrf91_clock.h @@ -102,8 +102,8 @@ #define CLOCK_LFCLKSRC_SRC_SHIFT (0) /* Bits 0-1: LFRC clock source */ #define CLOCK_LFCLKSRC_SRC_MASK (3 << CLOCK_LFCLKSRC_SRC_SHIFT) -# define CLOCK_LFCLKSRC_SRC_RFU (1 << CLOCK_LFCLKSTAT_SRC_SHIFT) -# define CLOCK_LFCLKSRC_SRC_LFRC (2 << CLOCK_LFCLKSTAT_SRC_SHIFT) -# define CLOCK_LFCLKSRC_SRC_LFXO (3 << CLOCK_LFCLKSTAT_SRC_SHIFT) +# define CLOCK_LFCLKSRC_SRC_RFU (0 << CLOCK_LFCLKSTAT_SRC_SHIFT) +# define CLOCK_LFCLKSRC_SRC_LFRC (1 << CLOCK_LFCLKSTAT_SRC_SHIFT) +# define CLOCK_LFCLKSRC_SRC_LFXO (2 << CLOCK_LFCLKSTAT_SRC_SHIFT) #endif /* __ARCH_ARM_SRC_NRF91_HARDWARE_NRF91_CLOCK_H */ diff --git a/arch/arm/src/nrf91/nrf91_clockconfig.c b/arch/arm/src/nrf91/nrf91_clockconfig.c index f104ae8d36..f002e83f71 100644 --- a/arch/arm/src/nrf91/nrf91_clockconfig.c +++ b/arch/arm/src/nrf91/nrf91_clockconfig.c @@ -33,13 +33,8 @@ #include "arm_internal.h" #include "nrf91_clockconfig.h" #include "hardware/nrf91_clock.h" -#include "hardware/nrf91_power.h" #include "hardware/nrf91_gpio.h" -#ifdef CONFIG_NRF91_APPCORE -# include "nrf91_oscconfig.h" -#endif - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -78,8 +73,6 @@ void nrf91_clockconfig(void) #if defined(CONFIG_NRF91_LFCLK_XTAL) putreg32(CLOCK_LFCLKSRC_SRC_LFXO, NRF91_CLOCK_LFCLKSRC); -#elif defined(CONFIG_NRF91_LFCLK_SYNTH) - putreg32(CLOCK_LFCLKSRC_SRC_LFSYNT, NRF91_CLOCK_LFCLKSRC); #else putreg32(CLOCK_LFCLKSRC_SRC_LFRC, NRF91_CLOCK_LFCLKSRC); #endif @@ -89,8 +82,6 @@ void nrf91_clockconfig(void) putreg32(0x0, NRF91_CLOCK_EVENTS_LFCLKSTARTED); putreg32(0x1, NRF91_CLOCK_TASKS_LFCLKSTART); - /* NOTE: Oscillator must be configured on the app core */ - while (!getreg32(NRF91_CLOCK_EVENTS_LFCLKSTARTED)) { /* Wait for LFCLK to be running */