From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] The GP timer is fixed for 1msec and CONFIG_SYS_HZ to 1000.
Date: Tue, 17 Mar 2009 09:54:27 +0100 [thread overview]
Message-ID: <20090317085427.07408832C2FD@gemini.denx.de> (raw)
In-Reply-To: <19F8576C6E063C45BE387C64729E73940427CBF3D2@dbde02.ent.ti.com>
Dear "Pillai, Manikandan",
In message <19F8576C6E063C45BE387C64729E73940427CBF3D2@dbde02.ent.ti.com> you wrote:
>
> > > - ulong now = readl(&timer_base->tcrr); /* current tick value */
> > > -
> > > - if (now >= lastinc) /* normal mode (non roll) */
> > > - /* move stamp fordward with absoulte diff ticks */
> > > - timestamp += (now - lastinc);
> > > - else /* we have rollover of incrementer */
> > > - timestamp += (0xFFFFFFFF - lastinc) + now;
> > > - lastinc = now;
> > > - return timestamp;
> >
> > As already mentioned in
> >
> > http://lists.denx.de/pipermail/u-boot/2009-March/048842.html
> >
> > I don't understand why you remove the overflow handling here?
> [Pillai, Manikandan] Is overflow handling really required here ???
What makes you sure it is NOT needed?
> > With '>> 6' this will result in 793.457Hz, with '>> 5' we will get
> > 1586.914Hz. Correct?
> >
> > Both doesn't fit
> [Pillai, Manikandan] I knew it doesn't give the correct values. This was tested
> using sleep() function. Since 5 gives a > time than 1 second, I picked up 5 here.
Argh... We don't need realy high precision, but I think we should
attempt to not worse than +/- 2% or so. THis implementation is not
acceptable.
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
"I can call spirits from the vasty deep."
"Why so can I, or so can any man; but will they come when you do call
for them?" - Shakespeare, 1 King Henry IV, Act III, Scene I.
prev parent reply other threads:[~2009-03-17 8:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 9:17 [U-Boot] [PATCH 1/1] The GP timer is fixed for 1msec and CONFIG_SYS_HZ to 1000 Manikandan Pillai
2009-03-16 18:44 ` Dirk Behme
2009-03-17 4:38 ` Pillai, Manikandan
2009-03-17 8:54 ` Wolfgang Denk [this message]
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=20090317085427.07408832C2FD@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