[U-Boot] [PATCH v2 3/4] mx5: Optimize lowlevel_init for TO 3

Stefano Babic sbabic at denx.de
Mon Aug 20 10:20:36 CEST 2012


On 14/08/2012 17:19, Benoît Thébaudeau wrote:
> The mx5 lowlevel_init.S contains code that detects the silicon revision at
> runtime, and that behaves differently if a silicon revision older than TO 3 is
> detected. This code is useless for recently designed boards that may not be
> fitted with older silicon revisions. Hence, this patch adds an option to
> optimize away this revision-specific code from lowlevel_init.S.
> 
> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau at advansee.com>
> Cc: Stefano Babic <sbabic at denx.de>
> ---

Hi Benoît,

> Changes for v2:
>  - Make patch description more detailed.
> 
>  .../arch/arm/cpu/armv7/mx5/lowlevel_init.S         |    4 ++--
>  .../doc/README.imx5                                |    7 ++++++-
>  2 files changed, 8 insertions(+), 3 deletions(-)
> 

The ROM revision is currently detected at run time - because this does
not fix an evident bug, your patch intends to reduce the footprint.

Then I chacked on a mx51evk, a board thet was shipped by Freescale with
TO 2 (and maybe TO 1 ?), and there are surely samples with TO2 or TO3 in
the world.

Without the poatch:

Configuring for mx51evk - Board: mx51evk, Options:
IMX_CONFIG=board/freescale/mx51evk/imximage.cfg
   text	   data	    bss	    dec	    hex	filename
 258168	  15872	 268464	 542504	  84728	./u-boot

With the patch:

Configuring for mx51evk - Board: mx51evk, Options:
IMX_CONFIG=board/freescale/mx51evk/imximage.cfg
   text	   data	    bss	    dec	    hex	filename
 258140	  15872	 268492	 542504	  84728	./u-boot

We win only 28 bytes - on the other side, we had a CONFIG_ that is not
so clear how to be used, mainly if a board as the mx51evk was shipped
with both versions.

I think the advantages are negligible here.

Best regards,
Stefano

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


More information about the U-Boot mailing list