All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] U-boot
Date: Sat, 22 Jan 2011 13:22:24 +0100	[thread overview]
Message-ID: <4D3ACC00.3040400@free.fr> (raw)
In-Reply-To: <4D3AB8BC.8060805@emk-elektronik.de>

Hi Reinhard,

Le 22/01/2011 12:00, Reinhard Meyer a ?crit :
> Dear Albert ARIBAUD,
>
> this is not an ARM local issue.

Well, there *is* an ARM specific side of it (use of gd variables during 
relocation), and that is what prompted me to start the RFC, but 
generalization to U-boot is welcome if it leads to a satisfactory 
solution. If not, at least I'll adopt a solution for ARM.

> The timeouts are used in generic drivers all around u-boot.
>
> Have a grep for get_timer, reset_timer...
>
> The most ugly use is with reset_timer involved, where the internal
> pseudo-tick is reset to zero, so all calls to get_timer are
> relative to that moment.
>
> We are looking at replacing all those occurrences of reset_timer
> and get_timer with "better" methods.

Seems to me this replacement is quite straightforward, as most uses of 
reset_timer() and subsequent get_timer are actually loops, functionally 
the same as our proposals, only instead of using a local to store the 
start or end time, they reset ticks to zero -- which, I concur, is a Bad 
Thing.

But 'reset_timer()' calls just need to be replaced with your 'timeout = 
timeout_init(N)' or my 'then = now()' and 'get_timer() > N' or 
'get_timer_masked() > N' by your 'time_out(timeout)' or my 
'ms_elapsed(N)'. Seems to me like a tedious effort, possibly involving 
occasional time-out value conversions, but not a difficulty.

What do I miss?

> Best Regards,
> Reinhard

Amicalement,
-- 
Albert.

  reply	other threads:[~2011-01-22 12:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-22 10:20 [U-Boot] [RFC] ARM timing code refactoring Albert ARIBAUD
2011-01-22 10:42 ` Reinhard Meyer
2011-01-22 11:32   ` Albert ARIBAUD
2011-01-22 11:00 ` [U-Boot] [RFC] U-boot (was: ARM) " Reinhard Meyer
2011-01-22 12:22   ` Albert ARIBAUD [this message]
2011-01-22 19:19 ` [U-Boot] [RFC] ARM " Wolfgang Denk
2011-01-22 20:17   ` Albert ARIBAUD
2011-01-22 21:26     ` Wolfgang Denk
2011-01-22 21:51       ` Reinhard Meyer
2011-01-23 10:12         ` Wolfgang Denk
2011-01-23 10:26           ` Reinhard Meyer
2011-01-23 16:23             ` Wolfgang Denk
2011-01-23 18:47               ` Reinhard Meyer
2011-01-23 19:35                 ` Wolfgang Denk
2011-01-23 20:59                   ` Albert ARIBAUD
2011-01-23 21:22                     ` Reinhard Meyer
2011-01-23 22:01                       ` Reinhard Meyer
2011-01-23 22:57                       ` Wolfgang Denk
2011-01-24  1:42                         ` J. William Campbell
2011-01-24  7:24                           ` Albert ARIBAUD
2011-01-24  7:50                             ` Reinhard Meyer
2011-01-24 12:59                               ` Wolfgang Denk
2011-01-24  8:25                             ` Andreas Bießmann
2011-01-24 11:58                               ` Albert ARIBAUD
2011-01-24 12:06                                 ` Albert ARIBAUD
2011-01-24 12:58                                 ` Andreas Bießmann
2011-01-24 12:54                             ` Wolfgang Denk
2011-01-24 13:02                             ` Wolfgang Denk
2011-01-24 16:23                               ` J. William Campbell
2011-01-22 22:13       ` Albert ARIBAUD
2011-01-23 16:15         ` Wolfgang Denk

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=4D3ACC00.3040400@free.fr \
    --to=albert.aribaud@free.fr \
    --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.