[U-Boot] [PATCH] armv7, timer: move static data to global_data struct

Andreas Bießmann andreas.devel at googlemail.com
Tue Nov 30 09:10:54 CET 2010


Dear Heiko Schocher,

Am 30.11.2010 08:54, schrieb Heiko Schocher:
> Hello Andreas,
> 
> Andreas Bießmann wrote:
>> Am 30.11.2010 um 08:02 schrieb Heiko Schocher:
>>

[snip another ARM-SoC add to GD for timer]

>> can't this generalized in some way?
> 
> Good question.
> 
>> AT91 still has some values like that in global_data, yesterday David Müller sent a patch for S3C24X0 to add some values like that to global_data ... we have a lot of arm cores out there, should each get his own style of global_data?
> 
> A common way would be better, ideas are welcome ;-)

I think Reinhard is already thinking about a solution.

> For example we could rename for the armv7 timer variants the "lastinc"
> and "lastdec" value in "lastval", so we could merge them ... if it
> is possible to find a solution for all arm cores, I don;t know ...

A short look to the arm/cpu/**/timer.c showed that most of them use a 16
bit timer to provide an 32 bit timer value. For that class of timer
implementation it would be suffucient to have a 'uint32_t
last_timer_val' and an 'uint32_t timestamp' in GD.

regards

Andreas Bießmann


More information about the U-Boot mailing list