linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mx27: Print silicon revision on boot
Date: Mon, 22 Aug 2011 19:09:11 +0200	[thread overview]
Message-ID: <20110822170911.GZ31404@pengutronix.de> (raw)
In-Reply-To: <CAOMZO5BLpSKROCpo0N293VtqpE4RigwPnXmW6HHCt1skNHRZGg@mail.gmail.com>

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@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 |

  parent reply	other threads:[~2011-08-22 17:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-22 15:52 [PATCH] ARM: mx27: Print silicon revision on boot Fabio Estevam
2011-08-22 16:05 ` Marek Vasut
2011-08-22 16:10   ` Fabio Estevam
2011-08-22 16:43     ` Marek Vasut
2011-08-22 17:09     ` Sascha Hauer [this message]
2011-08-22 18:21       ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110822170911.GZ31404@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).