From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Robert_Deli=EBn?= Date: Fri, 8 Dec 2006 13:23:39 +0100 Subject: [U-Boot-Users] get_timer versus get_ticks Message-ID: <000001c71ac3$b1290970$dfdd9182@code1.emi.philips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello, I am currently straightening out lib-mips/time.c to make its granularity defined by CFG_HZ (=1000) instead of the processor?s frequency at which MIPS counters normally run. Can somebody explain me what the difference between get_timer and get_ticks is? Get_timer returns the current value of the timer in 1/CFG_HZ units, as I would expect. I would expect get_ticks to return the raw counter value, but that value would useless because there?s no way to tell what speed it?s running at: get_tbclk is returning CFG_HZ and not the actual counter incremental frequency. In common/main.c get_ticks is used in conjuction with get_tbclk as if it were get_timer. This indicates either get_tbclk should be returning the actual counter incremental frequency, or get_ticks to return the same value as get_timer(0). I have looked at the PPC implementation, but that wasn?t of much help because there a hardware time base is used so that solution always correct. Thanks in advance! With kind regards, Robert. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.denx.de/pipermail/u-boot/attachments/20061208/daa777b0/attachment.htm