public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] armv7, timer: move static data to global_data struct
Date: Tue, 30 Nov 2010 08:54:52 +0100	[thread overview]
Message-ID: <4CF4ADCC.9060101@denx.de> (raw)
In-Reply-To: <0CD9BF11-6356-44A8-BABA-0AA08671D9FB@googlemail.com>

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

  reply	other threads:[~2010-11-30  7:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30  7:02 [U-Boot] [PATCH] armv7, timer: move static data to global_data struct Heiko Schocher
2010-11-30  7:14 ` Andreas Bießmann
2010-11-30  7:54   ` Heiko Schocher [this message]
2010-11-30  8:10     ` Andreas Bießmann
2010-11-30  8:11     ` Minkyu Kang
2010-11-30  8:06   ` Wolfgang Denk
2010-11-30  8:00 ` Thomas Weber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF4ADCC.9060101@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox