devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Li <Frank.Li@nxp.com>
To: lznuaa@gmail.com, shawnguo@kernel.org
Cc: devicetree@vger.kernel.org, Frank Li <Frank.Li@freescale.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/4] ARM: imx7d: correct chip version information
Date: Tue, 5 Jan 2016 11:17:17 -0600	[thread overview]
Message-ID: <1452014237-12848-4-git-send-email-Frank.Li@nxp.com> (raw)
In-Reply-To: <1452014237-12848-1-git-send-email-Frank.Li@nxp.com>

From: Frank Li <Frank.Li@freescale.com>

The commond 'cat /sys/devices/soc0/revision' can
show correct soc version information.

"unknow revision" message in imx_print_silicon_rev()
will never work for digprog.

Signed-off-by: Frank Li <Frank.Li@freescale.com>
---
Change from v1 to v2:
 fix grammer issues in comments.

 arch/arm/mach-imx/anatop.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/anatop.c b/arch/arm/mach-imx/anatop.c
index 231bb25..bd3555e 100644
--- a/arch/arm/mach-imx/anatop.c
+++ b/arch/arm/mach-imx/anatop.c
@@ -151,7 +151,14 @@ void __init imx_init_revision_from_anatop(void)
 		revision = IMX_CHIP_REVISION_1_5;
 		break;
 	default:
-		revision = IMX_CHIP_REVISION_UNKNOWN;
+		/*
+		 * Fail back to return raw register value instead of 0xff.
+		 * It will be easy to know version information in SOC if it
+		 * can't be recognized by known version. And some chip's (i.MX7D)
+		 * digprog value match linux version format, so it needn't map
+		 * again and we can use register value directly.
+		 */
+		revision = digprog & 0xff;
 	}
 
 	mxc_set_cpu_type(digprog >> 16 & 0xff);
-- 
2.5.2

  parent reply	other threads:[~2016-01-05 17:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 17:17 [PATCH v2 1/4] ARM: dts: imx7d: add arch timer Frank Li
2016-01-05 17:17 ` [PATCH v2 2/4] ARM: imx: select HAVE_ARM_ARCH_TIMER if selected i.MX7D Frank Li
2016-01-05 17:17 ` [PATCH v2 3/4] ARM: imx: config: enable psci default Frank Li
2016-01-05 17:17 ` Frank Li [this message]
     [not found] ` <1452014237-12848-1-git-send-email-Frank.Li-3arQi8VN3Tc@public.gmane.org>
2016-01-21 22:39   ` [PATCH v2 1/4] ARM: dts: imx7d: add arch timer Zhi Li
2016-01-28  8:34   ` Shawn Guo

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=1452014237-12848-4-git-send-email-Frank.Li@nxp.com \
    --to=frank.li@nxp.com \
    --cc=Frank.Li@freescale.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lznuaa@gmail.com \
    --cc=shawnguo@kernel.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).