[U-Boot] [RFC] Review of U-Boot timer API

Wolfgang Denk
2011-05-25T12:26:15Z

Dear Graeme Russ,

In message <4DDCED75.8030906@gmail.com> you wrote:
>
> >>> I don't get you. In such a system, the interrupt would be the tick
> >>> (see the PPC implementation). If you miss interrupts, you miss ticks.
...
> > The "tick counter" is already in the higher level, i. e. implemented
> > in software, without any hardware based registers.
...

> Now every time get_timer() is called, the prescaler updates the timer from
> the current tick count - This cannot fail if interrupts are inadvertently
> disabled.

Arghh... But in this szenario, if interrupts are disabled, then the
ISR will not run, so the tick count will not be incremented BECAUSE
THE TICK COUNTER IS A VARIABLE THAT GETS INCREMENTED BY ONE EACH TIME
THE ISR RUNS. So your prescaler will read a constant value.

Sorry for shouting, but I feel either you are not listening to me or I
cannot make myself understood to you.

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
Violence in reality is quite different from theory.
-- Spock, "The Cloud Minders", stardate 5818.4