All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] lib: time: Add microsecond timer
Date: Wed, 16 Oct 2019 18:44:25 +0200	[thread overview]
Message-ID: <1751086f-8f4d-8622-6a71-1004f97d2ee7@gmail.com> (raw)
In-Reply-To: <CAPnjgZ0UvQ1fv9Db_AkTfnq8Hkwq18VSAkYsCH4cD_uNHEDUGQ@mail.gmail.com>

On 10/16/19 6:40 PM, Simon Glass wrote:
> Hi Marek,

Hi,

> On Wed, 16 Oct 2019 at 02:55, Marek Vasut wrote:
>>
>> On 10/16/19 3:30 AM, Simon Glass wrote:
>>> Hi Marek,
>>
>> Hi,
>>
>>> On Tue, 15 Oct 2019 at 14:43, Marek Vasut wrote:
>>>>
>>>> Add get_timer_us(), which is useful e.g. when we need higher
>>>> precision timestamps.
>>>
>>> Can we use timer_get_us()? It seems confusing to have two.
>>
>> Nope, that one doesn't have the range (unsigned long vs. u64) and also
>> doesn't behave the same way as old get_timer(). I wanted something which
>> is similar, just for uS instead of mS.
> 
> Can you add comments to your patch to indicate what is going on any
> why to use this?
> 
> Bootstage uses ulong which is enough for about an hour. How long is
> U-Boot running?

It can run as long as anyone needs.

> If you are using differential times, presumably for timeouts, then
> there seems to be little reason to need u64.

I use it for logging timestamps during profiling, e.g. of the EHCI driver.

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2019-10-16 16:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 20:43 [U-Boot] [PATCH] lib: time: Add microsecond timer Marek Vasut
2019-10-16  1:30 ` Simon Glass
2019-10-16  8:55   ` Marek Vasut
2019-10-16 16:40     ` Simon Glass
2019-10-16 16:44       ` Marek Vasut [this message]
2019-10-16 16:54         ` Simon Glass
2019-10-16 16:55           ` Marek Vasut
2019-10-16 16:58             ` Simon Glass
2019-10-16 17:02               ` Marek Vasut
2019-10-16 17:11 ` Eugeniu Rosca
2019-10-16 17:26   ` Marek Vasut
2019-10-16 17:43     ` Eugeniu Rosca
2019-10-16 17:51       ` Eugeniu Rosca
2019-10-16 18:03         ` Marek Vasut
2019-11-01 13:30 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1751086f-8f4d-8622-6a71-1004f97d2ee7@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.