[U-Boot] [PATCH v2 3/6] dm: x86: Update timer_get_boot_us to work before DM is ready

Simon Glass sjg at chromium.org
Wed Sep 6 01:39:33 UTC 2017


Hi Bin,

On 27 August 2017 at 23:18, Bin Meng <bmeng.cn at gmail.com> wrote:
> Hi Simon,
>
> On Sun, Aug 27, 2017 at 11:23 PM, Simon Glass <sjg at chromium.org> wrote:
>> Use the new separate init function so that we can make use of the timer
>> before driver model is started up.
>>
>> At some point we should consider adding the microsecond timer to the timer
>> uclass interface since it would reduce the amount of plumbing here
>> slightly.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> ---
>>
>> Changes in v2:
>> - Rebase on top of early timer code and simplify slightly
>>
>>  drivers/timer/tsc_timer.c | 19 ++++++++++++++-----
>>  1 file changed, 14 insertions(+), 5 deletions(-)
>>
>
> I don't think this patch is needed. The early timer support was
> already provided in the patch [2/6] in this series.

The current version of timer_get_boot_us() does not init the timer if
it is not set up, so will return incorrect values at the start.

So I think this patch is needed.

Regards,
Simon


More information about the U-Boot mailing list