
On 15/06/11 22:49, Wolfgang Denk wrote:
Dear Graeme Russ,
In message 4DF8A694.3030208@gmail.com you wrote:
But as Fabio has pointed out, the '2.0' in 'rev 2.0' is not srev - This highlights the root of the problem - (srev == 0x20) != (rev 2.0)
But everybody who spends half a minute on the problem can easily determine this, without adding code for an exotic error case.
Only if they know '(unknown)' changes the meaning of 'rev' to 'srev' - And that's the problem. If you don't have access to the code (or some fine documentation) how will you know that 'rev 2.0 (unknown)' means you need to search the SOC manual for 'srev == 0x20'
It's not any new information that gets printed, it's just minimally differently formatted.
It is more information - In the known case, you are printing mx31_cpu_type[i].v in the unknown case, you are printing srev
Now I personally think that in itself is a no-no, but fixing it would mean doing something like:
CPU: Freescale i.MX31 rev 2.0 (srev = 0x32) at 531 MHz.Reset cause: WDOG for the known case
and
CPU: Freescale i.MX31 unknown rev 0.0 (srev = 0x20) at 531 MHz.Reset cause: WDOG
for the unknown case - Oops, we hit 80 characters :(
Regards,
Graeme