[U-Boot] [PATCH] MX31: change return value of get_cpu_rev

Stefano Babic sbabic at denx.de
Fri Apr 29 14:14:20 CEST 2011


On 04/29/2011 01:36 PM, Detlev Zundel wrote:
> Hi Stefano,
> 
>> Drop warnings in get_cpu_rev and changes the return value
>> (a u32 instead of char * is returned) of the function
>> to be coherent with other processors.
>>
>> Signed-off-by: Stefano Babic <sbabic at denx.de>
>> CC: Detlev Zundev <dzu at denx.de>
> 
> Can you please correct the spelling of my name?  Thanks.

Sorry, I should know how to write your name...


>> @@ -129,7 +129,7 @@ char *get_cpu_rev(void)
>>  	for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++)
>>  		if (srev == mx31_cpu_type[i].srev)
>>  			return mx31_cpu_type[i].v;
>> -		return "unknown";
>> +	return srev;
> 
> Hm, so we drop the "unknown" case and return the srev unchanged.

Yes, I have changed this behavior. I thought, if the revision is not in
the table, it is better to know which is the value of srev register. I
do not know if it is better to print only an "unknown" or get directly
the value of the register, to check in some documentation which new
version was put on the board.

> And here we have no way of knowing if the output number is the result of
> a correct translation or if our table is insufficient.  This is not
> good.
> 
> Please provide a "unknown" case again for missing table entries.

Understood. I will change the behavior as set previously.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list