[U-Boot-Users] [PATCH 04/10 v2] [ARM] TQMA31: add new board with i.MX31 processor

Sascha Hauer s.hauer at pengutronix.de
Thu Jul 10 11:30:01 CEST 2008


On Thu, Jul 10, 2008 at 10:49:09AM +0200, Wolfgang Denk wrote:
> In message <20080710081725.GP4595 at pengutronix.de> you wrote:
> > 
> > >> CFG_HZ is a constant and has to be 1000.
> > 
> > Why is it a board specific define then?
> 
> Historical reasons only. When PPCBoot was created, I played with that
> parameter to get a feeling  for  the  involved  overhead,  etc.  This
> should  really  be removed, but as you know too many boards depend on
> this.
> 
> > You could add a software divider in get_timer(). But I think it's better
> > to define CFG_HZ to whatever the timer frequency is. At least 49 boards
> > do it.
> 
> That's what I mean: many boards need fixing.

How about using the Linux clocksource framework for U-Boot? I did this
for V2 and it works like a charm. The timer implementation is straight
forward. You only have to setup a free running timer and return its
value, so there's not much to do wrong when implementing new timers.
Currently U-Boot has many timing functions like get_timer,
get_timer_masked, reset_timer, reset_timer_masked, udelay and I suppose
most people do not understand the meaning of those functions, as the
differing implementations show.
Not that I volunteer to do this job though :(

Regards,
  Sascha

-- 
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9




More information about the U-Boot mailing list