From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= Date: Mon, 20 Aug 2012 12:12:34 +0200 (CEST) Subject: [U-Boot] [PATCH v2 3/4] mx5: Optimize lowlevel_init for TO 3 In-Reply-To: <5031F354.5030307@denx.de> Message-ID: <125633220.2578056.1345457554652.JavaMail.root@advansee.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > Cc: Stefano Babic > > --- > > 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