From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 30 Mar 2005 09:13:31 +0200 Subject: [U-Boot-Users] OCOTEA get_timer() bug In-Reply-To: <4249E219.7000507@mc.com> References: <20050328195851.A1730C108D@atlas.denx.de> <200503290826.01044.sr@denx.de> <4249E219.7000507@mc.com> Message-ID: <200503300913.32078.sr@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, On Wednesday 30 March 2005 01:17, Andrew Wozniak wrote: > My only concern with the fix is that it will break something else that > assumes the timer interval to be 10msec. There are a few "files" that > depend on it for timeout operations: > > cpu/ppc4xx/440gx_enet.c > if ((time_now - time_start) > 3000) <--- 30 sec timo? This is 440 specific, but in the comments a few lines above 3 seconds timeout is mentioned. So even this seems to be a bug with a 10 ms timer interval. > net/bootp.c > bp->bp_secs = htons(get_timer(0) / CFG_HZ); > ... > BootpID += get_timer(0); > > net/tftp.c > TftpOurPort = 1024 + (get_timer(0) % 3072); > > net/net.c > post/rtc.c > tools/updater/flash_hw.c All this is generic code (not 440 spcific), so a 1 ms timer interval is assumed. Give me a few days and I will test it on an OCOTEA board. Best regards, Stefan