[U-Boot] [PATCH] armv7, timer: move static data to global_data struct
Heiko Schocher
hs at denx.de
Tue Nov 30 08:54:52 CET 2010
Hello Andreas,
Andreas Bießmann wrote:
> Am 30.11.2010 um 08:02 schrieb Heiko Schocher:
>
>> diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
>> index ada3fbb..16dc27c 100644
>> --- a/arch/arm/include/asm/global_data.h
>> +++ b/arch/arm/include/asm/global_data.h
>> @@ -61,6 +61,16 @@ typedef struct global_data {
>> unsigned long tbu;
>> unsigned long long timer_reset_value;
>> #endif
>> +#if defined(CONFIG_OMAP) || defined(CONFIG_MX51)
>> + unsigned long timestamp;
>> + unsigned long lastinc;
>> +#endif
>> +#if defined(CONFIG_S5P)
>> + unsigned long count_value;
>> + /* Internal tick units */
>> + unsigned long long timestamp; /* Monotonic incrementing timer */
>> + unsigned long lastdec; /* Last decremneter snapshot */
>> +#endif
>> unsigned long relocaddr; /* Start address of U-Boot in RAM */
>> phys_size_t ram_size; /* RAM size */
>> unsigned long mon_len; /* monitor len */
>
> 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 ;-)
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 ...
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
More information about the U-Boot
mailing list