Skip to content

Commit d443dd8

Browse files
bjarki-andreasennordic-krch
authored andcommitted
Revert "[nrf fromlist] drivers: clock_control: nrf2: add support for global hfsll clock"
This reverts commit 5227b68. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 99faf47 commit d443dd8

File tree

4 files changed

+14
-330
lines changed

4 files changed

+14
-330
lines changed

drivers/clock_control/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_RENESAS_RA_CGC clock_cont
3535
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_AMBIQ clock_control_ambiq.c)
3636
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_PWM clock_control_pwm.c)
3737
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_RPI_PICO clock_control_rpi_pico.c)
38-
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_NRF2_GLOBAL_HSFLL clock_control_nrf2_global_hsfll.c)
3938

4039
if(CONFIG_CLOCK_CONTROL_NRF2)
4140
zephyr_library_sources(clock_control_nrf2_common.c)

drivers/clock_control/Kconfig.nrf

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -193,31 +193,4 @@ config CLOCK_CONTROL_NRF2_NRFS_CLOCK_TIMEOUT_MS
193193
int "Timeout waiting for nrfs clock service callback in milliseconds"
194194
default 1000
195195

196-
config CLOCK_CONTROL_NRF2_GLOBAL_HSFLL
197-
bool "Clock control for global HSFLL"
198-
depends on NRFS_GDFS_SERVICE_ENABLED
199-
default y
200-
201-
if CLOCK_CONTROL_NRF2_GLOBAL_HSFLL
202-
203-
config CLOCK_CONTROL_NRF2_GLOBAL_HSFLL_TIMEOUT_MS
204-
int "Frequency request timeout in milliseconds"
205-
default 10000
206-
207-
config CLOCK_CONTROL_NRF2_GLOBAL_HSFLL_REQ_LOW_FREQ
208-
bool "Request LOW frequency on init"
209-
default y
210-
help
211-
The GDFS service will default to HIGH frequency until it receives
212-
a lower frequency request. The NRF2 clock controller drivers
213-
expect the clock to be initialized to their lowest frequency, so
214-
we need to send a request on init to align GDFS with the NRF2
215-
clock controller driver.
216-
217-
This initial request can be disabled to prevent a potentially
218-
unnecessary HIGH -> LOW -> HIGH cycle given some module will
219-
request a HIGH frequency on init anyway.
220-
221-
endif # CLOCK_CONTROL_NRF2_GLOBAL_HSFLL
222-
223196
endif # CLOCK_CONTROL_NRF2

drivers/clock_control/clock_control_nrf2_global_hsfll.c

Lines changed: 0 additions & 302 deletions
This file was deleted.

drivers/clock_control/clock_control_nrf2_hsfll.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "clock_control_nrf2_common.h"
99
#include <zephyr/devicetree.h>
1010
#include <zephyr/drivers/clock_control/nrf_clock_control.h>
11+
#include <hal/nrf_hsfll.h>
1112

1213
#include <zephyr/logging/log.h>
1314
LOG_MODULE_DECLARE(clock_control_nrf2, CONFIG_CLOCK_CONTROL_LOG_LEVEL);
@@ -182,6 +183,18 @@ static int api_cancel_or_release_hsfll(const struct device *dev,
182183
#endif
183184
}
184185

186+
static int api_get_rate_hsfll(const struct device *dev,
187+
clock_control_subsys_t sys,
188+
uint32_t *rate)
189+
{
190+
ARG_UNUSED(dev);
191+
ARG_UNUSED(sys);
192+
193+
*rate = nrf_hsfll_clkctrl_mult_get(NRF_HSFLL) * MHZ(16);
194+
195+
return 0;
196+
}
197+
185198
static int hsfll_init(const struct device *dev)
186199
{
187200
#ifdef CONFIG_NRFS_DVFS_LOCAL_DOMAIN
@@ -208,6 +221,7 @@ static struct nrf_clock_control_driver_api hsfll_drv_api = {
208221
.std_api = {
209222
.on = api_nosys_on_off,
210223
.off = api_nosys_on_off,
224+
.get_rate = api_get_rate_hsfll,
211225
},
212226
.request = api_request_hsfll,
213227
.release = api_release_hsfll,

0 commit comments

Comments
 (0)