[U-Boot] [PATCH 2/3] mxs: generalize code for print_cpuinfo()

Stefano Babic sbabic at denx.de
Sun Jun 17 19:56:16 CEST 2012


On 17/06/2012 18:02, Marek Vasut wrote:

>> I like that there will be support for i.MX23, too. But I dislike that
>> everything takes the name "MX28". As you suggest in your subject, maybe
>> it is time to rename directories, and use "mxs" (as in kernel) instead
>> of mx28.
> 
> We can do that eventually, later ... it depends on the ordering of Otavio's 
> patches, I'm fine either way.

Fine with me - anyway, it is something must be done.

> 
>>> +
>>> +static u8 get_cpu_rev(void)
>>> +{
>>> +	struct mx28_digctl_regs *digctl_regs =
>>> +		(struct mx28_digctl_regs *)MXS_DIGCTL_BASE;
>>> +
>>> +	return readl(&digctl_regs->hw_digctl_chipid) & 0x0000F;
>>> +}
>>
>> Everywhere (i.MX, omap, ...) get_cpu_rev returns u32. The function is
>> currently exported, too.
> 
> Correct, but isn't the return value mangled somehow (like having major rev. << 
> 16 and minor rev. << 0 )? Or that's only IMX?

Checking in current implementations for get_cpu_rev() (i.MX / OMAP24 /
OMAP3 / AM33, and even board/apollon/sys_info.c: I do not know why the
cpu detection is inseide this file), none of them requires strictly 32
bit. However, we should be coherent in all code - for this reason I
dislike if one of the i.MX is implemented differently as for other SOCs.

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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list