Skip to content

Commit ddc9a63

Browse files
Revert "[nrf fromlist] drivers: timer: nrf_grtc_timer: add last_count initialization"
This reverts commit de4fad1. Signed-off-by: Adam Kondraciuk <[email protected]>
1 parent 231cc29 commit ddc9a63

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

drivers/timer/nrf_grtc_timer.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ static struct k_spinlock lock;
6666
static uint64_t last_count; /* Time (SYSCOUNTER value) @last sys_clock_announce() */
6767
static atomic_t int_mask;
6868
static uint8_t ext_channels_allocated;
69-
static uint64_t grtc_start_value;
7069
static nrfx_grtc_channel_t system_clock_channel_data = {
7170
.handler = sys_clock_timeout_handler,
7271
.p_context = NULL,
@@ -359,11 +358,6 @@ int z_nrf_grtc_timer_capture_read(int32_t chan, uint64_t *captured_time)
359358
return 0;
360359
}
361360

362-
uint64_t z_nrf_grtc_timer_startup_value_get(void)
363-
{
364-
return grtc_start_value;
365-
}
366-
367361
#if defined(CONFIG_POWEROFF) && defined(CONFIG_NRF_GRTC_START_SYSCOUNTER)
368362
int z_nrf_grtc_wakeup_prepare(uint64_t wake_time_us)
369363
{
@@ -491,8 +485,6 @@ static int sys_clock_driver_init(void)
491485
}
492486
#endif /* CONFIG_NRF_GRTC_START_SYSCOUNTER */
493487

494-
last_count = sys_clock_tick_get() * CYC_PER_TICK;
495-
grtc_start_value = last_count;
496488
int_mask = NRFX_GRTC_CONFIG_ALLOWED_CC_CHANNELS_MASK;
497489
if (!IS_ENABLED(CONFIG_TICKLESS_KERNEL)) {
498490
system_timeout_set_relative(CYC_PER_TICK);

include/zephyr/drivers/timer/nrf_grtc_timer.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -189,17 +189,6 @@ int z_nrf_grtc_timer_capture_read(int32_t chan, uint64_t *captured_time);
189189
*/
190190
int z_nrf_grtc_wakeup_prepare(uint64_t wake_time_us);
191191

192-
/** @brief Get the GRTC counter value latched at startup.
193-
*
194-
* @note The GRTC timer is not cleared by software at startup,
195-
* while the system tick starts counting from zero.
196-
* In some cases, it may be necessary to compare the system tick
197-
* with the GRTC value — in such situations, this offset can be useful.
198-
*
199-
* @return GRTC value latched during system clock initialization.
200-
*/
201-
uint64_t z_nrf_grtc_timer_startup_value_get(void);
202-
203192
/**
204193
* @brief Initialize the GRTC clock timer driver from an application-
205194
* defined function.

0 commit comments

Comments
 (0)