[U-Boot-Users] [PATCH 3/3][MIPS] lib_mips/time.c: Fix improper use of CFG_HZ and timer routines
Wolfgang Denk
wd at denx.de
Sun May 25 17:18:38 CEST 2008
In message <48396D8C.8050402 at ruby.dti.ne.jp> you wrote:
>
> My udelay is already global-variable-free. And as for cycles_per_jiffy
> and expirelo, we could make it work like this:
...
> -static unsigned int expirelo;
> +static unsigned long cycles_per_jiffy = (CONFIG_MIPS_TIMER_FREQ + CFG_HZ / 2) / CFG_HZ;
If it's a constant anyway - then why do we need a variable for it?
> But I have no clue about timestamp.
Maybe there is a register that is (1) common to all or at least most
of the supported processors we could use for that? If not, then we
probably have to use the initial data structure for this.
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
I think it's a new feature. Don't tell anyone it was an accident. :-)
-- Larry Wall on s/foo/bar/eieio in <10911 at jpl-devvax.JPL.NASA.GOV>
More information about the U-Boot
mailing list