[U-Boot] [PATCH] mx31: Improve the handling of unidentified silicon version

Graeme Russ graeme.russ at gmail.com
Wed Jun 15 14:08:27 CEST 2011


Hi Fabio,

On 15/06/11 21:50, Fabio Estevam wrote:
> Hi Stefano,
> 
> On 6/15/2011 2:29 AM, Stefano Babic wrote:
> ...
>>
>> Why is the new output better as we have now ? You drop the output of
>> the srev register, and then we cannot get which strange silicon version
>> is running without patching the code.
> 
> Let me try to explain the problem I see with the current silicon detection mechanism:
> 
> On my board (srev=0x28), which is a TO2.0 silicon I get:
> 
> CPU:   Freescale i.MX31 rev 2.0 at 531 MHz.Reset cause: WDOG
> 
> On Felix´s MX31ADS board (srev=0x20) (unknown chip version) he gets:
> 
> CPU:   Freescale i.MX31 rev 2.0 unknown at 531 MHz.Reset cause: WDOG
> 
> Reading rev 2.0 on Felix´s case is misleading IMHO as we tend to think that we have a TO2.0 silicon on his board even though we get a "unknown" string.
> 
> The reason of this is that we currently return the .v struct when the silicon version is detected and the srev version when it is not recognized.

Ouch

>>>  		if (srev == mx31_cpu_type[i].srev)
>>>  			return mx31_cpu_type[i].v;
>>>  
>>> -	return srev | 0x8000;
>>> +	return 0x8000;
>>
>> IMHO in the case the revision is not recognized, it is better to print
>> the value of the srev register, as it is done now. 
> 
> Yes, agreed, but we should print srev as an hex number instead of a string as done today
> 
> If you agree I can implement the following logic:
> 
> When the chip version is detected let´s just leave as it is today:
> 
> CPU:   Freescale i.MX31 rev 2.0 at 531 MHz.Reset cause: WDOG
> 
> When the chip version is not valid, then we print:
> 
> CPU:   Freescale i.MX31 (unknown rev, srev=0x20) at 531 MHz.Reset cause: WDOG
> 
> Please let me know what you think about this proposal.

Does 'srev' have a more plain language description? or would somebody
reading that instantly know what 'srev' meant?

If the later, then this looks good. If the former, then you really should
be saying "(unknown rev, SOC Silicon ID=0x20)" where 'SOC silicon ID' is a
string taken directly from a data sheet or manual. There is nothing worse
than trying to do a search on a debug message in a manual where the string
does not even exist

Regards,

Graeme




More information about the U-Boot mailing list