All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Karszniewicz <r.karszniewicz@phytec.de>
To: Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org
Cc: Peng Fan <peng.fan@nxp.com>,
	Stefan Riedmueller <s.riedmueller@phytec.de>,
	Anson Huang <Anson.Huang@nxp.com>,
	Russell King <linux@armlinux.org.uk>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>
Subject: [PATCH 2/2] ARM: mach-imx: imx6q: Set system_rev to show soc revision
Date: Mon, 23 Nov 2020 18:08:11 +0100	[thread overview]
Message-ID: <1606151291-288303-2-git-send-email-r.karszniewicz@phytec.de> (raw)
In-Reply-To: <1606151291-288303-1-git-send-email-r.karszniewicz@phytec.de>

From: Stefan Riedmueller <s.riedmueller@phytec.de>

The system_rev value is shown in /proc/cpuinfo as Revision. Make use of
this by showing the SOC Revision there.

Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de>
---
 arch/arm/mach-imx/mach-imx6q.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 703998ebb52e..4ec304de547a 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -15,6 +15,7 @@
 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
+#include <asm/system_info.h>
 
 #include "common.h"
 #include "cpuidle.h"
@@ -245,16 +246,19 @@ static void __init imx6q_axi_init(void)
 
 static void __init imx6q_init_machine(void)
 {
-	if (cpu_is_imx6q() && imx_get_soc_revision() >= IMX_CHIP_REVISION_2_0)
+	if (cpu_is_imx6q() && imx_get_soc_revision() >= IMX_CHIP_REVISION_2_0) {
 		/*
 		 * SoCs that identify as i.MX6Q >= rev 2.0 are really i.MX6QP.
 		 * Quirk: i.MX6QP revision = i.MX6Q revision - (1, 0),
 		 * e.g. i.MX6QP rev 1.1 identifies as i.MX6Q rev 2.1.
 		 */
 		imx_print_silicon_rev("i.MX6QP", imx_get_soc_revision() - 0x10);
-	else
+		system_rev = IMX_CHIP_REVISION_1_0;
+	} else {
 		imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
 				imx_get_soc_revision());
+		system_rev = imx_get_soc_revision();
+	}
 
 	imx6q_enet_phy_init();
 
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-11-23 17:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 17:08 [PATCH 1/2] ARM: mach-imx: imx6ul: Print SOC revision on boot and set system_rev Robert Karszniewicz
2020-11-23 17:08 ` Robert Karszniewicz [this message]
2020-12-04 14:15 ` Robert Karszniewicz
2021-01-05  1:31 ` Shawn Guo
2021-01-05 10:04   ` Robert Karszniewicz

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=1606151291-288303-2-git-send-email-r.karszniewicz@phytec.de \
    --to=r.karszniewicz@phytec.de \
    --cc=Anson.Huang@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux@armlinux.org.uk \
    --cc=peng.fan@nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=s.riedmueller@phytec.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.