[U-Boot] [PATCH 2/2] MX5: board version not printed corretly on MX51EVK

Jason Liu liu.h.jason at gmail.com
Tue Oct 26 12:29:12 CEST 2010


Hi, Stefano,

2010/10/26 Stefano Babic <sbabic at 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 <r64343 at 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.

Yes, agree. Then we need clean up the code for vision2 board too.


>
> 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
> =====================================================================
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>


More information about the U-Boot mailing list