From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Fri, 15 Mar 2013 19:26:53 +0100 Subject: [U-Boot] [PATCH v4] Add initial support for Wandboard dual lite and solo. In-Reply-To: <20130315172741.353A42005F7@gemini.denx.de> References: <1363228354-29534-1-git-send-email-festevam@gmail.com> <20130314123136.3A79E2005BB@gemini.denx.de> <20130314202406.5FE6520057D@gemini.denx.de> <5143365F.5000207@denx.de> <20130315172741.353A42005F7@gemini.denx.de> Message-ID: <514367ED.6070101@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 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 =====================================================================