[U-Boot] [PATCH 2/3] mxs: generalize code for print_cpuinfo()
Marek Vasut
marex at denx.de
Sun Jun 17 20:04:00 CEST 2012
Dear Stefano Babic,
> 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.
+1
> Best regards,
> Stefano Babic
Best regards,
Marek Vasut
More information about the U-Boot
mailing list