summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig3
-rw-r--r--lib/time.c14
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;