[U-Boot-Users] [PATCH 3/3][MIPS] lib_mips/time.c: Fix improper use of CFG_HZ and timer routines
Shinya Kuribayashi
skuribay at ruby.dti.ne.jp
Sat May 31 08:12:30 CEST 2008
Wolfgang Denk wrote:
> 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?
Of course, we don't. That was for easy review, will fix.
>> 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
I'm afraid there's not such register left.
> probably have to use the initial data structure for this.
Looked around board_init_r, and it seems there is no {set,get}_timer
user there. I'm going to leave timestamp as it is at this moment.
Shinya
More information about the U-Boot
mailing list