diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-02 21:02:10 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-04 22:09:26 +0200 |
commit | 6a853dbcc02ba26d8b85d26be9763464c6bfe63e (patch) | |
tree | 5a11796dc7c0feedbe33424b84fec4cb19e266cc /include/time.h | |
parent | 66ca24a9a05aa094bcdcf0784d8cc5911dc2f725 (diff) | |
download | u-boot-6a853dbcc02ba26d8b85d26be9763464c6bfe63e.tar.gz u-boot-6a853dbcc02ba26d8b85d26be9763464c6bfe63e.tar.bz2 u-boot-6a853dbcc02ba26d8b85d26be9763464c6bfe63e.zip |
lib: time: export usec_to_tick()
In the UEFI Stall() boottime service we need access to usec_to_tick().
Export the function.
Remove redundant implementation in arch/arm/mach-rockchip/rk_timer.c.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'include/time.h')
-rw-r--r-- | include/time.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h index 9fd0d73fb4..1e9b369be7 100644 --- a/include/time.h +++ b/include/time.h @@ -4,6 +4,7 @@ #define _TIME_H #include <linux/typecheck.h> +#include <linux/types.h> unsigned long get_timer(unsigned long base); @@ -21,6 +22,14 @@ unsigned long timer_get_us(void); */ void timer_test_add_offset(unsigned long offset); +/** + * usec_to_tick() - convert microseconds to clock ticks + * + * @usec: duration in microseconds + * Return: duration in clock ticks + */ +uint64_t usec_to_tick(unsigned long usec); + /* * These inlines deal with timer wrapping correctly. You are * strongly encouraged to use them |