[U-Boot] core ticks/timer code
Wolfgang Denk
wd at denx.de
Tue Mar 31 22:46:15 CEST 2009
Dear Dirk Behme,
In message <49CDCCC1.5050503 at googlemail.com> you wrote:
>
> > - get_ticks - return some notion of "cpu ticks"
>
> Yes. Returns the number of cpu ticks since power up. I.e. with 1000
> ticks per second (CONFIG_SYS_HZ) the number of elapsed ms since power up.
Hey. What a chance. We have a wiki. Add that information.
> Yes. Some implementations just return CONFIG_SYS_HZ which is supposed
> to be 1000.
get_ticks() makes no sense to me.
> > - timer_init - setup a core timer
>
> Some implementations do this in interrupt_init(), too.
Let them do it, if they need it, and if they document why they need
it.
> > - get_timer(x) - not really sure what this is supposed to represent, or how
> > "x" is used
See ppc code.
> > - 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)
>
> CONFIG_SYS_HZ is supposed to be 1000
>
> Does this make sense?
Yes, it makes sense that CONFIG_SYS_HZ is supposed to be 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
What is research but a blind date with knowledge? -- Will Harvey
More information about the U-Boot
mailing list