History log of /rk3399_rockchip-uboot/include/time.h (Results 1 – 2 of 2)
Revision Date Author Comments
# 21cdd133 27-Dec-2016 Masahiro Yamada <yamada.masahiro@socionext.com>

time: import time_after, time_before and friends from Linux

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 / 1000

time: import time_after, time_before and friends from Linux

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>

show more ...


# a7b81769 27-Dec-2016 Masahiro Yamada <yamada.masahiro@socionext.com>

time: move timer APIs to include/time.h

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.

time: move timer APIs to include/time.h

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>

show more ...