On 17/06/2012 14:58, Otavio Salvador wrote: > The information now is gathered from HW_DIGCTL_CHIPID register and > includes the revision of the chip on the output. > > Signed-off-by: Otavio Salvador <ota...@ossystems.com.br> > Cc: Marek Vasut <ma...@denx.de> > Cc: Stefano Babic <sba...@denx.de> > Cc: Fabio Estevam <fabio.este...@freescale.com> > ---
Hi Otavio, > arch/arm/cpu/arm926ejs/mx28/mx28.c | 29 +++++++++++++++++++++++++++-- > 1 file changed, 27 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c > b/arch/arm/cpu/arm926ejs/mx28/mx28.c > index a82ff25..ac2f2e0 100644 > --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c > +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c > @@ -190,13 +190,38 @@ int arch_cpu_init(void) > #endif > > #if defined(CONFIG_DISPLAY_CPUINFO) > +static const char *get_cpu_type(void) > +{ > + struct mx28_digctl_regs *digctl_regs = > + (struct mx28_digctl_regs *)MXS_DIGCTL_BASE; > + > + switch (readl(&digctl_regs->hw_digctl_chipid) >> 16) { > + case 0x2800: > + return "28"; > + case 0x3728: > + return "23"; > + default: > + return "<unidentified>"; > + } > +} 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. > + > +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. 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: sba...@denx.de ===================================================================== _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot