sys_clock: add option for setting timer frequency at runtime
Some timer devices, such as the HPET, read their frequencies at runtime. All global constant values must be set at runtime in that case. Change-Id: I408babce6deb857748a87691132d7e27e88f0bb8 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
cdf8123589
commit
fde6458f0b
3 changed files with 18 additions and 1 deletions
|
@ -35,7 +35,12 @@
|
|||
#endif
|
||||
|
||||
#define sys_clock_ticks_per_sec CONFIG_SYS_CLOCK_TICKS_PER_SEC
|
||||
|
||||
#if defined(CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME)
|
||||
extern int sys_clock_hw_cycles_per_sec;
|
||||
#else
|
||||
#define sys_clock_hw_cycles_per_sec CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
#endif
|
||||
|
||||
/*
|
||||
* sys_clock_us_per_tick global variable represents a number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue