summaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@kernel.org>2026-04-10 14:18:57 +0200
committerThomas Gleixner <tglx@kernel.org>2026-07-15 15:04:55 +0200
commitdfc256dac54c8b692110bf905c64cb130e15963d (patch)
tree4afc93732b58e322168f62f03d85753d6012c19a /arch/arm/lib
parent3ed403bbc967a3138b8e37566510e9b062751372 (diff)
downloadlinux-next-dfc256dac54c8b692110bf905c64cb130e15963d.tar.gz
linux-next-dfc256dac54c8b692110bf905c64cb130e15963d.zip
calibrate: Rework delay timer calibration
The header define in asm/timex,h and the naming of the function to read the delay timer are confusing at best. Convert it to a config switch selected by the archictures which provide the functionality and rename the function to delay_read_timer(), which makes the purpose clear. Move the declaration to linux/delay.h where it belongs. Remove the resulting empty asm/timex.h files as well. No functional change. Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260410120317.978403520@kernel.org
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/delay.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c
index b7fe84f68bf1..7e9304012a68 100644
--- a/arch/arm/lib/delay.c
+++ b/arch/arm/lib/delay.c
@@ -12,7 +12,6 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/timex.h>
/*
* Default to the loop-based delay implementation.
@@ -27,15 +26,14 @@ static const struct delay_timer *delay_timer;
static bool delay_calibrated;
static u64 delay_res;
-int read_current_timer(unsigned long *timer_val)
+bool delay_read_timer(unsigned long *timer_val)
{
if (!delay_timer)
- return -ENXIO;
-
+ return false;
*timer_val = delay_timer->read_current_timer();
- return 0;
+ return true;
}
-EXPORT_SYMBOL_GPL(read_current_timer);
+EXPORT_SYMBOL_GPL(delay_read_timer);
static inline u64 cyc_to_ns(u64 cyc, u32 mult, u32 shift)
{