grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units


From: Ian Campbell
Subject: Re: [PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units
Date: Sun, 22 Dec 2013 01:21:38 +0000

On Sat, 2013-12-21 at 23:23 +0100, Vladimir 'φ-coder/phcoder' Serbinenko
wrote:
> On 15.12.2013 16:23, Ian Campbell wrote:
> > From: Ian Campbell <address@hidden>
> > 
> > u-boot's API_GET_TIMER returns the current time in ms by directly exposing 
> > the
> > internal get_timer which is in ms, which isn't all that clearly documented 
> > but
> > is obvious from the use within u-boot and is mentioned in
> > http://www.denx.de/wiki/U-Boot/TaskTimerAPI.
> > 
> During tests on my raspberry pi, I actually experienced the exact
> opposite. On PI timer API is in microseconds.
> Are you sure you made no mistake?

I'm quite sure that on the Midway platform get_timer was returning ms
and the 5s grub countdown took 5s after my fix and some interminably
long time before it.

Sadly actual documentation of the u-boot API is a bit thin on the
ground, but get_timer==ms is also corroborated by some ad-hoc googling I
did (e.g. resulting in the above link) as well as inspection of some
random u-boot ports. Some ports have an explicit get_timer_us function,
which adds credence to the idea that get_timer is in ms instead.

Ian.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]