[PATCH] ARM: mx27: Print silicon revision on boot

Sascha Hauer s.hauer at pengutronix.de
Mon Aug 22 13:09:11 EDT 2011


On Mon, Aug 22, 2011 at 01:10:46PM -0300, Fabio Estevam wrote:
> On Mon, Aug 22, 2011 at 1:05 PM, Marek Vasut <marek.vasut at gmail.com> wrote:
> ...
> >
> > I didn't check really, but can't you just do some kind of a numeric
> > transformation instead of storing strings ?
> 
> I am using the same approach used by other i.MX processors.

How about

imx_print_silicon_rev(const char *cpu, int srev)
{
	if (srev == IMX_CHIP_REVISION_UNKNOWN)
		pr_info("CPU identified as %s, unknown revision\n");
	else
		pr_info("CPU identified as %s, silicon rev %d.%d\n",
			cpu, (srev >> 4) & 0xf, srev & 0xf);
}

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the linux-arm-kernel mailing list