[U-Boot-Users] main clock calculation invalid

Martin Krause Martin.Krause at tqs.de
Fri Apr 20 11:18:08 CEST 2007


wd at denx.de wrote on Friday, April 20, 2007 10:18 AM:
> In message
> <47F3F98010FF784EBEE6526EAAB078D1024F8528 at tq-mailsrv.tq-net.de> you
> wrote:  
> > 
> > You could rearrange your formula:
> > 
> > CONFIG_SYS_CLK_FREQ / ((prediv + 2) * (1 << ps)) * (maindiv2 + 2) *
> > (maindiv1 + 2) 
> > 
> > The compiler should do the calculation from left to right.
> 
> And if in doubt, use parens to define the order of evaluation.

Ahhh, I always had a strong feeling, that theses parenthesis things 
would be good for something ... ;-)

Ragards,
Martin





More information about the U-Boot mailing list