From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Tue, 30 Nov 2010 08:54:52 +0100 Subject: [U-Boot] [PATCH] armv7, timer: move static data to global_data struct In-Reply-To: <0CD9BF11-6356-44A8-BABA-0AA08671D9FB@googlemail.com> References: <1291100540-24293-1-git-send-email-hs@denx.de> <0CD9BF11-6356-44A8-BABA-0AA08671D9FB@googlemail.com> Message-ID: <4CF4ADCC.9060101@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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