[U-Boot] [PATCH 1/1] mx5: drop boot cause code from board support code

Jason Hui jason.hui at linaro.org
Fri Apr 22 07:45:29 CEST 2011


Hi, Stefano,

On Fri, Apr 22, 2011 at 1:18 AM, Stefano Babic <sbabic at denx.de> wrote:
> On 04/20/2011 12:47 PM, Jason Liu wrote:
>> The boot cause code has been factor out to soc common
>> code,we need drop the part from the board support code
>>
>> Signed-off-by: Jason Liu <jason.hui at linaro.org>
>
> Hi Jason,
>
>> ---
>>  board/efikamx/efikamx.c           |   30 ++++++------------------------
>>  board/freescale/mx51evk/mx51evk.c |   26 ++++++--------------------
>>  board/freescale/mx53evk/mx53evk.c |   21 +--------------------
>>  board/ttcontrol/vision2/vision2.c |   28 ++++++----------------------
>>  4 files changed, 19 insertions(+), 86 deletions(-)
>>
>> diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c
>> index f735260..0aef654 100644
>> --- a/board/efikamx/efikamx.c
>> +++ b/board/efikamx/efikamx.c
>> @@ -644,46 +644,28 @@ int board_late_init(void)
>>  int checkboard(void)
>>  {
>>       u32 system_rev = get_cpu_rev();
>> -     u32 cause;
>> -     struct src *src_regs = (struct src *)SRC_BASE_ADDR;
>
> This seems to me not the best solution. If we have now factored out code
> to print the reset cause and the silicon version (inside print_cpuinfo),
> why do we need to repeat this code for each board ? Calling get_cpu_rev
> seems to me redundant (then each board should only set
> CONFIG_DISPLAY_CPUINFO). And then the CPU revision is printed again, and
> this is redundant.

The purpose for this patch is to remove the boot cause code and and don't change
any cpu rev code. The cpu rev part of code is as it is as before.

>
>>
>>       puts("Board: Efika MX ");
>>
>>       switch (system_rev & 0xff) {
>
> As I see in code, in system_rev & 0xff we can find the cpu revision, and
> the output is already part of print_cpuinfo.

Ditto, as I only remove the boot cause part of code as the patch tile said.

>
> I think we need more clean up, removing all part related to CPU revision
> and leaving (if any) only the output related to the board revision.

If that, I need change the patch tile, and include more clean up in the patch
and send again.

Jason


>
> 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
> =====================================================================
>


More information about the U-Boot mailing list