All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] MX5: board version not printed corretly on MX51EVK
Date: Tue, 26 Oct 2010 09:53:49 +0200	[thread overview]
Message-ID: <4CC6890D.7040307@denx.de> (raw)
In-Reply-To: <1287746745-16068-2-git-send-email-r64343@freescale.com>

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 <r64343@freescale.com>
> ---
>  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
=====================================================================

  reply	other threads:[~2010-10-26  7:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 11:25 [U-Boot] [PATCH 1/2] imx: Get fec mac address from fuse Jason Liu
2010-10-22 11:25 ` [U-Boot] [PATCH 2/2] MX5: board version not printed corretly on MX51EVK Jason Liu
2010-10-26  7:53   ` Stefano Babic [this message]
2010-10-26 10:29     ` Jason Liu
2010-10-27  7:22       ` Stefano Babic
2010-10-26  7:45 ` [U-Boot] [PATCH 1/2] imx: Get fec mac address from fuse Stefano Babic
2010-10-26 10:35   ` Jason Liu
2010-10-27  7:21     ` Stefano Babic
2010-10-27  7:40       ` Jason Liu
2010-10-27  8:49         ` Stefano Babic
2010-10-27  9:21           ` Jason Liu
2010-10-27 17:50             ` John Rigby
2010-10-27 18:06               ` Wolfgang Denk
2010-10-27 18:59                 ` John Rigby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CC6890D.7040307@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.