Revert "kernel: retrieve system timer clock frequency at runtime or static"
This reverts commit 7c03e5de7f
.
https://github.com/zephyrproject-rtos/zephyr/pull/69705
Introduced a regression in main in which
tests/subsys/logging/log_timestamp
started failing. (See
https://github.com/zephyrproject-rtos/zephyr/issues/72344
for more info).
Let's revert the PR. It can be submitted after with the issue
fixed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
33c253c813
commit
2f5e93938b
3 changed files with 5 additions and 6 deletions
|
@ -146,9 +146,9 @@ typedef struct {
|
||||||
|
|
||||||
/** @endcond */
|
/** @endcond */
|
||||||
|
|
||||||
#if defined(CONFIG_SYS_CLOCK_EXISTS) && !defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
|
#if defined(CONFIG_SYS_CLOCK_EXISTS) && \
|
||||||
BUILD_ASSERT(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC != 0,
|
(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC == 0)
|
||||||
"SYS_CLOCK_HW_CYCLES_PER_SEC must be non-zero!");
|
#error "SYS_CLOCK_HW_CYCLES_PER_SEC must be non-zero!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ BUILD_ASSERT(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC != 0,
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_SYS_CLOCK_EXISTS) && !defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
|
#ifdef CONFIG_SYS_CLOCK_EXISTS
|
||||||
|
|
||||||
#if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME) || \
|
#if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME) || \
|
||||||
(MSEC_PER_SEC % CONFIG_SYS_CLOCK_TICKS_PER_SEC) || \
|
(MSEC_PER_SEC % CONFIG_SYS_CLOCK_TICKS_PER_SEC) || \
|
||||||
|
|
|
@ -799,7 +799,6 @@ config SYS_CLOCK_TICKS_PER_SEC
|
||||||
|
|
||||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||||
int "System clock's h/w timer frequency"
|
int "System clock's h/w timer frequency"
|
||||||
depends on !TIMER_READS_ITS_FREQUENCY_AT_RUNTIME
|
|
||||||
help
|
help
|
||||||
This option specifies the frequency of the hardware timer used for the
|
This option specifies the frequency of the hardware timer used for the
|
||||||
system clock (in Hz). This option is set by the SOC's or board's Kconfig file
|
system clock (in Hz). This option is set by the SOC's or board's Kconfig file
|
||||||
|
|
|
@ -25,7 +25,7 @@ static struct k_spinlock timeout_lock;
|
||||||
static int announce_remaining;
|
static int announce_remaining;
|
||||||
|
|
||||||
#if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
|
#if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
|
||||||
int z_clock_hw_cycles_per_sec;
|
int z_clock_hw_cycles_per_sec = CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC;
|
||||||
|
|
||||||
#ifdef CONFIG_USERSPACE
|
#ifdef CONFIG_USERSPACE
|
||||||
static inline int z_vrfy_sys_clock_hw_cycles_per_sec_runtime_get(void)
|
static inline int z_vrfy_sys_clock_hw_cycles_per_sec_runtime_get(void)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue