Dear Albert,

In message <20141114134733.01c82023@lilith> you wrote:
> 
> > -   u8 bootmode;
> > +   u8 bootmode = 0;
> 
> If you set bootmode to the default 0 value at declaration, then the code
> that follows in the source file can be simplified:
> 
>       u8 bootmode = 0;
> ---8<---
>       pcrvalue = in_be32(&pll->pcr) & 0xFF0F0FFF;
>       pfdr = pcrvalue >> 24;
> 
>       if (pfdr == 0x1E)
>               bootmode = 0;   /* Normal Mode */
> ---8<---
> 
> The part between scissors is useless now, and in turn, pfdr becomes unneeded.

Exactly.  This was my concern, too - otherwise I had provided auch a
trivial fix.  But I think here some deeper understanding of the
intended logic is needed.

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: w...@denx.de
Brain: an apparatus with which we think we think.    - Ambrose Bierce
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to