[U-Boot] core ticks/timer code

Wolfgang Denk
2009-04-06T19:43:15Z

Dear Scott,

In message <20090406191242.GA4439@ld0162-tx32.am.freescale.net> you wrote:
>
> > > Is there any particular reason not to change the powerpc get_timer
> > > implementation to use the timebase (scaled down to ms)?

Side note: we already use the timebase for the implementation of
udelay() and friends which are available as soon as we have a
(limited) C runtime environment, i. e. long before relocation.

> > I think so. There are some boards where we actually measure the system
> > clock frequency against a known reference clock. IIRC this requires
> > the TB to be independent, or something like that. [It's a long time
> > since that code was written.]
>
> The existing get_timer uses the decrementer, which is not independent of
> the timebase.

Yes, you are right. I should have looked up the actual implementation.
Sorry, volatile memory with too few/short refresh cycles ;-)

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
For every complex problem, there is a solution that is simple, neat,
and wrong. -- H. L. Mencken