diff options
author | Simon Glass <sjg@chromium.org> | 2019-11-14 12:57:26 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-12-02 18:23:11 -0500 |
commit | 6887c5bed9d7dc26f8dbd196a5878c9c4a128d94 (patch) | |
tree | d121bf5587037ff6cb28356d764809c2f808b909 /include | |
parent | 6c03f9e618f4a94900bdd5857117811e21ffb959 (diff) | |
download | u-boot-6887c5bed9d7dc26f8dbd196a5878c9c4a128d94.zip u-boot-6887c5bed9d7dc26f8dbd196a5878c9c4a128d94.tar.gz u-boot-6887c5bed9d7dc26f8dbd196a5878c9c4a128d94.tar.bz2 |
common: Move some time functions out of common.h
These functions belong in time.h so move them over and add comments.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 4 | ||||
-rw-r--r-- | include/time.h | 16 |
2 files changed, 16 insertions, 4 deletions
diff --git a/include/common.h b/include/common.h index 1e77ed3..20d143d 100644 --- a/include/common.h +++ b/include/common.h @@ -288,10 +288,6 @@ int cleanup_before_linux_select(int flags); uint64_t get_ticks(void); void wait_ticks (unsigned long); -/* arch/$(ARCH)/lib/time.c */ -ulong usec2ticks (unsigned long usec); -ulong ticks2usec (unsigned long ticks); - /* lib/uuid.c */ #include <uuid.h> diff --git a/include/time.h b/include/time.h index a114952..a1bdefc 100644 --- a/include/time.h +++ b/include/time.h @@ -70,4 +70,20 @@ uint64_t usec_to_tick(unsigned long usec); (time_after_eq(a,b) && \ time_before(a,c)) +/** + * usec2ticks() - Convert microseconds to internal ticks + * + * @usec: Value of microseconds to convert + * @return Corresponding internal ticks value, calculated using get_tbclk() + */ +ulong usec2ticks(unsigned long usec); + +/** + * ticks2usec() - Convert internal ticks to microseconds + * + * @ticks: Value of ticks to convert + * @return Corresponding microseconds value, calculated using get_tbclk() + */ +ulong ticks2usec(unsigned long ticks); + #endif /* _TIME_H */ |