[U-Boot] [PATCH] imx: don't clobber reset cause

Eric Nelson
2015-02-05T23:01:57Z

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