From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Thu, 05 Feb 2015 17:17:03 +0100 Subject: [U-Boot] [PATCH] imx: don't clobber reset cause In-Reply-To: <1423086661-5860-1-git-send-email-eric.nelson@boundarydevices.com> References: <1423086661-5860-1-git-send-email-eric.nelson@boundarydevices.com> Message-ID: <54D3977F.10401@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 04/02/2015 22:51, Eric Nelson wrote: > The cause of a reset is generally useful, and shouldn't be > blindly cleared in the process of displaying it as a part > of the boot announcement. > > If a particular system wants to clear it out, this should > be done later after there's an opportunity for code or > boot commands to read the value. > > Signed-off-by: Eric Nelson > --- > arch/arm/imx-common/cpu.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c > index 28ccd29..3e0a582 100644 > --- a/arch/arm/imx-common/cpu.c > +++ b/arch/arm/imx-common/cpu.c > @@ -30,7 +30,6 @@ char *get_reset_cause(void) > struct src *src_regs = (struct src *)SRC_BASE_ADDR; > > cause = readl(&src_regs->srsr); > - writel(cause, &src_regs->srsr); > > switch (cause) { > case 0x00001: > Acked-by: Stefano Babic Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk 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 =====================================================================