public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH (repost)] Nomadik: fix reset_timer()
Date: Tue, 03 Nov 2009 16:59:24 +0100	[thread overview]
Message-ID: <20091103155924.6284D3F6EC@gemini.denx.de> (raw)
In-Reply-To: <20091103152354.GA12451@mail.gnudd.com>

Dear Alessandro Rubini,

In message <20091103152354.GA12451@mail.gnudd.com> you wrote:
> > Um... why is READ_TIMER doing such a stupid thing as negating values?
> 
> Because the counter counts down. I could have returns "0 - value" or
> "~value".  Since I chose the latter initially, this fix keeps the same
> approach.  I can't return the value I read, since it goes backwards.

Well, to me READ_TIMER() sounds like a function/macro to read some
value from some timer; if that timer counts doen, then successive
calls to that macro/function would return decreasing values. Counting
up or down is a property of the specific timer and should be handled
elsewhere; such policy does IMHO not belong into some accessor
function.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Brain: an apparatus with which we think we think.    - Ambrose Bierce

  reply	other threads:[~2009-11-03 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-03 12:12 [U-Boot] [PATCH (repost)] Nomadik: fix reset_timer() Alessandro Rubini
2009-11-03 13:27 ` Wolfgang Denk
2009-11-03 15:23   ` Alessandro Rubini
2009-11-03 15:59     ` Wolfgang Denk [this message]
2009-11-03 16:03       ` Alessandro Rubini

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=20091103155924.6284D3F6EC@gemini.denx.de \
    --to=wd@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox