From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Nelson Date: Thu, 05 Feb 2015 16:01:57 -0700 Subject: [U-Boot] [PATCH] imx: don't clobber reset cause In-Reply-To: <54D3BB1E.1060409@denx.de> References: <1423086661-5860-1-git-send-email-eric.nelson@boundarydevices.com> <874mr0pbl2.fsf@nbsps.com> <54D3A625.5000101@denx.de> <54D3A6D9.8040602@boundarydevices.com> <54D3ADCF.7010102@denx.de> <54D3B4E8.1040505@boundarydevices.com> <54D3BB1E.1060409@denx.de> Message-ID: <54D3F665.6050103@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefano, On 02/05/2015 11:49 AM, Stefano Babic wrote: > Hi Eric, > > On 05/02/2015 19:22, Eric Nelson wrote: > >> >> Certainly, but it seems wrong to make a decision about where and how >> this might get passed to an O/S in code. >> >> If we want to generalize it, I'd be inclined to add commands to >> query (into a variable) and clear the reset cause. >> >> That would still require this patch though. > > I do not think there should be a command. The cause must be directly > associated to the variable, and the reset cause cleared. > Okay. Here are two options: The first one stores the value in 'reset_cause' as a hex value, and is generally more extensible: http://patchwork.ozlabs.org/patch/436972/ The second stores it as a human-readable string using roughly the same names as were previously printed. I changed the names slightly to avoid embedded whitespace so the values can be appended to bootargs without escapes: http://patchwork.ozlabs.org/patch/436974/ I prefer the first, but don't have a strong opinion one way or the other. Regards, Eric