]> git.baikalelectronics.ru Git - uboot.git/commit
x86: timer: Use a separate flag for whether timer is inited
authorSimon Glass <sjg@chromium.org>
Mon, 21 Oct 2019 03:37:47 +0000 (21:37 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Sat, 2 Nov 2019 23:20:27 +0000 (07:20 +0800)
commitd1e7982476ecf8da1125fb0c8ebdb36580811886
tree1032cb4ead808bfe33fc84ed63fdf4886115eb20
parentdb9c71e3dfc410f078c2df2db01e60ed3449a989
x86: timer: Use a separate flag for whether timer is inited

At present the value of the timer base is used to determine whether the
timer has been set up or not. It is true that the timer is essentially
never exactly 0 when it is read. However 'time 0' may indicate the time
that the machine was reset so it is useful to be able to denote that.

Update the code to use a separate flag instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/include/asm/global_data.h
drivers/timer/tsc_timer.c