From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Sun, 17 Jun 2012 19:56:16 +0200 Subject: [U-Boot] [PATCH 2/3] mxs: generalize code for print_cpuinfo() In-Reply-To: <201206171802.49354.marex@denx.de> References: <1339937889-15538-1-git-send-email-otavio@ossystems.com.br> <1339937889-15538-3-git-send-email-otavio@ossystems.com.br> <4FDDFC8D.3010201@denx.de> <201206171802.49354.marex@denx.de> Message-ID: <4FDE1A40.40008@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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@denx.de =====================================================================