From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shinya Kuribayashi Date: Sat, 31 May 2008 15:12:30 +0900 Subject: [U-Boot-Users] [PATCH 3/3][MIPS] lib_mips/time.c: Fix improper use of CFG_HZ and timer routines In-Reply-To: <20080525151838.40B982402D@gemini.denx.de> References: <20080525151838.40B982402D@gemini.denx.de> Message-ID: <4840EC4E.4070108@ruby.dti.ne.jp> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > In message <48396D8C.8050402@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