diff options
| author | Tom Rini <[email protected]> | 2022-12-05 21:04:24 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-12-05 21:04:24 -0500 |
| commit | d2ad92927ea91ab8cece92a308350602c594dd3e (patch) | |
| tree | 23ec41dc6f0aff10b800c69396a32ac5ac926817 /lib | |
| parent | 1c470f32f74248ff4aa145bf033fb6524dc7fc2e (diff) | |
| parent | 7102d324f6b41741ee74587d43d77b302b1bbd96 (diff) | |
Merge branch '2022-12-05-Kconfig-migrations-and-renames' into next
- First batch of the patches that end up with
scripts/config_whitelist.tx being empty. Mostly migrations and a
little bit of code removal and CFG renaming.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig | 3 | ||||
| -rw-r--r-- | lib/time.c | 14 |
2 files changed, 10 insertions, 7 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 6abe1d0a863..c39fc523214 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -15,6 +15,9 @@ config SYS_NUM_ADDR_MAP help Sets the number of entries in the virtual-physical mapping table. +config SYS_TIMER_COUNTS_DOWN + bool "System timer counts down rathe than up" + config PHYSMEM bool "Access to physical memory region (> 4G)" help diff --git a/lib/time.c b/lib/time.c index f3aaf472d10..82350260eac 100644 --- a/lib/time.c +++ b/lib/time.c @@ -25,21 +25,21 @@ DECLARE_GLOBAL_DATA_PTR; -#ifdef CONFIG_SYS_TIMER_RATE +#ifdef CFG_SYS_TIMER_RATE /* Returns tick rate in ticks per second */ ulong notrace get_tbclk(void) { - return CONFIG_SYS_TIMER_RATE; + return CFG_SYS_TIMER_RATE; } #endif -#ifdef CONFIG_SYS_TIMER_COUNTER +#ifdef CFG_SYS_TIMER_COUNTER unsigned long notrace timer_read_counter(void) { #ifdef CONFIG_SYS_TIMER_COUNTS_DOWN - return ~readl(CONFIG_SYS_TIMER_COUNTER); + return ~readl(CFG_SYS_TIMER_COUNTER); #else - return readl(CONFIG_SYS_TIMER_COUNTER); + return readl(CFG_SYS_TIMER_COUNTER); #endif } @@ -47,8 +47,8 @@ ulong timer_get_boot_us(void) { ulong count = timer_read_counter(); -#ifdef CONFIG_SYS_TIMER_RATE - const ulong timer_rate = CONFIG_SYS_TIMER_RATE; +#ifdef CFG_SYS_TIMER_RATE + const ulong timer_rate = CFG_SYS_TIMER_RATE; if (timer_rate == 1000000) return count; |
