[U-Boot] [PATCH v2 3/4] mx5: Optimize lowlevel_init for TO 3
Benoît Thébaudeau
benoit.thebaudeau at advansee.com
Mon Aug 20 12:12:34 CEST 2012
Hi Stefano,
> 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.
To make things easier, this config should be used only for boards always shipped
with the newer versions.
> I think the advantages are negligible here.
Indeed. I needed that for a specific case where any single byte was worth
saving. For upstream U-Boot, I let you decide if this is interesting enough or
not.
Best regards,
Benoît
More information about the U-Boot
mailing list