On Wednesday, May 25, 2011, Wolfgang Denk <w...@denx.de> wrote:
> Dear Graeme Russ,
>
> In message <4ddcf926.1050...@gmail.com> you wrote:
>>
>> Many platforms have a hardware counter which is incremented without
>> assistance from software - not by an ISR, nothing (I mentioned this before,
>> but I can't track down the exact email) - THIS is the tick counter returned
>> by get_ticks() which the prescaler uses to update the timer when you either:
>>
>>  - Explicitly call get_timer()
>>  - Call the prescaler from an ISR
>>
>> The thing is, I have now highlighted that relying on interrupts to keep
>> get_timer() working is a really bad idea - We have no way of stopping
>> anyone from calling disable_interrupts() before using the timer
>
> There may be code which doe snot call get_timer() for _long_ times.
> And somebody disables interrupts. What's then?
>
We're hosed, but at least we are one better than relying on interrupts alone ;)

And what about platforms that do not support interrupts? Are you
mandating that get_timer() MUST always be supported by a timer updated
by an ISR?

Regards,

Graeme
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to