From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Tue, 26 Oct 2010 09:53:49 +0200 Subject: [U-Boot] [PATCH 2/2] MX5: board version not printed corretly on MX51EVK In-Reply-To: <1287746745-16068-2-git-send-email-r64343@freescale.com> References: <1287746745-16068-1-git-send-email-r64343@freescale.com> <1287746745-16068-2-git-send-email-r64343@freescale.com> Message-ID: <4CC6890D.7040307@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/22/2010 01:25 PM, Jason Liu wrote: > Fix the board version printing issue on MX51EVK. Need to read > the board version via get_cpu_rev and not rely on system_rev > due to the system_rev not initialized at boardchecking time. > > Signed-off-by: Jason Liu > --- > board/freescale/mx51evk/mx51evk.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) Hi Jason, > > diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c > index d6bb71c..c532603 100644 > --- a/board/freescale/mx51evk/mx51evk.c > +++ b/board/freescale/mx51evk/mx51evk.c > @@ -438,6 +438,8 @@ int board_late_init(void) > > int checkboard(void) > { > + u32 system_rev = get_cpu_rev(); > + > puts("Board: MX51EVK "); > > switch (system_rev & 0xff) { Then we need to clean up other part of the code: system_rev should be not declared globally in the file and must be removed. In the same time, get_board_rev() should be changed. It seems it is in any case wrong, because it returns the same value, and this means get_cpu_rev(). As this is a cpu revision and not a board revision, it is not correct. If the board revision cannot be determined correctly at runtime, we should return a fixed value. but certainly not the cpu revision. Best regards, Stefano Babic -- ===================================================================== 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 =====================================================================