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

J. William Campbell
2011-05-23T18:27:17Z

On 5/23/2011 6:19 AM, Wolfgang Denk wrote:
> Dear Graeme Russ,
<snip>
> This is what PPC is doing. And I understand that Reinhard did the same
> in software for AT91.
Hi All,
My apologies for being a little (perhaps more than a little)
dense. As they say, "after further review", I think the key aspect of
the PPC timer system is that it uses the decrementer register to
generate an interrupt at a 1 KHz rate. What I have been attempting here
is to produce a timer system that does not use interrupts at all. This
is a fundamental design question. Naturally, systems that can generate
an interrupt at a 1 KHz rate (or at any (reasonable) higher rate for
that matter) using the decrementer register can produce a 1 ms
resolution software counter that updates "by magic". If my understanding
of this PPC code is incorrect, somebody please stop me before I make a
further fool of myself! Is it then a design requirement that the timer
system use interrupts? Is that what is meant by using the PPC system as
a model? If so, is it possible/reasonable on all the u-boots that are
out there to generate and process timer interrupts at some (hopefully
but not necessarily) programmable rate?

Best Regards,
Bill Campbell
> Best regards,
>
> Wolfgang Denk
>