[U-Boot] [PATCH] armv7, timer: move static data to global_data struct
Wolfgang Denk
wd at denx.de
Tue Nov 30 09:06:25 CET 2010
Dear =?iso-8859-1?Q?Andreas_Bie=DFmann?=,
In message <0CD9BF11-6356-44A8-BABA-0AA08671D9FB at googlemail.com> you wrote:
>
> > +#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?
It can, and it should.
But I suggest we handle such a cleanup as a separate task and defer it
until the next release (which means that any such patches will go to
the "next" branch if they come now).
I guess if we provide something like
uint64_t timebase;
uint32_t timelast;
this should cover most of the cases. We can add this without ifdef's,
and only eventually a few implementations may need another variable
added.
Patches welcome...
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When in doubt, mumble; when in trouble, delegate; when in charge,
ponder. -- James H. Boren
More information about the U-Boot
mailing list