[U-Boot] [PATCH v2 10/14] x86: tsc: Introduce config option for early timer frequency

Simon Glass sjg at chromium.org
Fri Oct 19 03:26:10 UTC 2018


On 13 October 2018 at 21:52, Bin Meng <bmeng.cn at gmail.com> wrote:
> So far the TSC timer driver supports trying hardware calibration first
> and using device tree as last resort for its running frequency as the
> normal timer.
>
> However when it is used as the early timer, it only supports hardware
> calibration and if it fails, the driver just panics. This introduces
> a new config option to specify the early timer frequency in MHz and
> it should be equal to the value described in the device tree.
>
> Without this patch, the travis-ci testing on QEMU x86_64 target fails
> each time after it finishes the 'bootefi selftest' as the test.py see
> an error was emitted on the console like this:
>
>   TSC frequency is ZERO
>   resetting ...
>   ### ERROR ### Please RESET the board ###
>
> It's strange that this error is consistently seen on the travis-ci
> machine, but only occasionally seen on my local machine (maybe 1 out
> of 10). Since QEMU x86_64 target enables BOOTSTAGE support which uses
> early timer, with this fix it should work without any failure.
>
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>
> ---
>
> Changes in v2:
> - Change to use MHz instead of Hz for the early timer frequency
>
>  drivers/timer/Kconfig     | 10 ++++++++++
>  drivers/timer/tsc_timer.c |  6 +++---
>  2 files changed, 13 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list