From: Wolfgang Denk Date: Tue, 31 Mar 2009 22:43:44 +0200 Subject: [U-Boot] core ticks/timer code In-Reply-To: <200903272130.26825.vapier@gentoo.org> References: <200903272130.26825.vapier@gentoo.org> Message-ID: <20090331204344.3F35083797DC@gemini.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 Dear Mike Frysinger, In message <200903272130.26825.vapier@gentoo.org> you wrote: > > unfortunately, there doesnt seem to be any docs on what exactly these > functions do so it's hard for me to verify/change any of it. If in doubt, look it up in the PowerPC implementation. That's the reference for what a half-way sane world could look like. > my understanding is that: > - get_ticks - return some notion of "cpu ticks" > - get_tbclk - return number of "cpu ticks" that elapse in one second > - timer_init - setup a core timer > - get_timer(x) - not really sure what this is supposed to represent, or ho> w > "x" is used > - reset_timer - reset core timer to 0 > - CONFIG_SYS_HZ - no idea how this relates to ticks/timer in U-Boot as in the > Linux world, this is the core timer (scheduler) frequency (how many times to > execute per second) It's the number of ticks per second, i. e. 1000. 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 Be kind to unkind people - they need it the most.