[U-Boot] [PATCH] ppc4xx: Cleanup of PVR detection code in cpu.c

Stefan Roese sr at denx.de
Wed Sep 22 10:52:52 CEST 2010


On Thursday 09 September 2010 14:35:11 Stefan Roese wrote:
> This patch cleans the PVR detection code in check_cpu() up a bit.
> Basically the strings are better seperated, resulting in an easier
> to understand and maintain code version.
> 
> The #ifdef's couldn't be removed easily because of two reasons:
> 
> - Some SoC revisions have the same PVR, so need a way to differentiate
>   between those two SoC's.
> - In some case statements registers only available in this SoC variant
>   are referenced.
> 
> Instead I moved the CONFIG_440 #ifdef a bit, so that 405 platforms don't
> add this 440 detection code and vice versa. Resulting in this U-Boot
> image size change:
> 
> 405EX (Kilauea):     408 bytes less
> 440EPx (Sequoia):    604 bytes less
> 460EX (Canyonlands): 564 bytes less

Applied to u-boot-ppc4xx/next. Thanks.
 
Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de


More information about the U-Boot mailing list