summaryrefslogtreecommitdiff
path: root/include/time.h
AgeCommit message (Collapse)Author
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-01-14time: import time_after, time_before and friends from LinuxMasahiro Yamada
It is not safe to compare timer values directly. On 32-bit systems, for example, timer_get_us() wraps around every 72 min. (2 ^ 32 / 1000000 =~ 4295 sec =~ 72 min). Depending on the get_ticks() implementation, it may wrap more frequently. The 72 min might be possible on the use of U-Boot. Let's borrow time_after, time_before, and friends to solve the wrap-around problem. These macros were copied from include/linux/jiffies.h of Linux 4.9. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-01-14time: move timer APIs to include/time.hMasahiro Yamada
The include/common.h is a collection of unrelated declarations, macros, etc. It is horrible to include such a cluttered header just for some timer functions. Split out timer functions into include/time.h. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>