[U-Boot] [PATCH v4] Add initial support for Wandboard dual lite and solo.

Stefano Babic sbabic at denx.de
Fri Mar 15 19:26:53 CET 2013


On 15/03/2013 18:27, Wolfgang Denk wrote:
> Dear Stefano Babic,
> 

Hi Wolfgang,

> I agree that it is important information, and there should be a way
> that the user can get at this information.  But I see no urgent need
> to print this for everyboot, where it is just costing us precious boot
> time (yes, it's only a few milliseconds, but they are trivial to
> save).
> 
> That was why I suggested to add thjis information for example to the
> output of the "bdinfo" command.

That is fine - but then it should be consistent. We have tried to have a
consistent API between SOCs (I mean: iMX SOCs), that is, each SOC in the
i.MX family should implement the same functions and not invent a new
one, And the behavior must beconsistent, too. I know we are far away to
be perfect, and some code can be further factorized (this was the reason
to add imx_common).

To the specific case, each i.MX SOC implements a get_reset_cause() function:

arch/arm/cpu/arm1136/mx31/generic.c:static char *get_reset_cause(void)
arch/arm/cpu/arm1136/mx31/generic.c:	printf("Reset cause: %s\n",

arch/arm/cpu/arm1136/mx35/generic.c:static char *get_reset_cause(void)
arch/arm/cpu/arm1136/mx35/generic.c:	printf("Reset cause: %s\n",
get_reset_cause());

arch/arm/cpu/arm926ejs/mx25/generic.c:static char *get_reset_cause(void)
arch/arm/cpu/arm926ejs/mx25/generic.c:	printf("Reset cause: %s\n\n",

arch/arm/imx-common/cpu.c:char *get_reset_cause(void)
arch/arm/imx-common/cpu.c:	printf("Reset cause: %s\n", get_reset_cause());

Checking this I see also that the mx53loco does not use general code
(bad !):

board/freescale/mx53loco/mx53loco.c:	printf("Reset cause: %s\n",

It is ok to move the information to bdinfo, but then it should not break
the consistence: all i.MX should follow the same rule. This makes also
easier for board maintainers to switch from a SOC to the next one,
because they have to provide quite the same functions in their code (and
using the same functions, too.).

> BTW: if I type "reset", I will get a message "Reset cause: WDOG".
> I know why, but most users will not know thy they see a watchdog reset
> here, so actually this information may be more confusing than helpful
> in a number of cases (which is IMO one more reason to not always to
> display it - it saves us a number of unproductive support requests).

I agree with you that this should be done by a separate patchset: it is
not related to the Wandboard. But if we go on this way, the same changes
should be done for all i.MX, not only for i.MX5/i.MX6.

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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list