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

Graeme Russ
2011-05-26T05:25:10Z

On Thu, May 26, 2011 at 3:16 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear "J. William Campbell",
>
> In message <4DDDDF2E.8070602@comcast.net> you wrote:
>>
>> ? ? ? ?True, if the processor supports timer interrupts. The problem is
>> that the existing u-boots in many cases do not. I think that is really
>> the crux of the problem. So what are we going to do? I am open to ideas
>> here.
>
> Which of the processors we're discussing here does not support timer
> interrupts? ?If there is any, how is the Linux system time implemented
> on this processor?

Well, they all support timer interrupts - It's just that that support
is not supported in U-Boot (yet)

I think we can still rationalise the timer API as suggested which, as
a minimum will:

- Not diminish current functionality for any platform
- Will dramatically reduce the current amount of code duplication
- Improve functionality on some platforms
- Simplify the whole API

and then start banging on arch maintainers heads to implement the trivial
ISR to kick the prescaler:

void timer_isr(void *unused)
{
prescaler();
}

Regards,

Graeme