[PATCH 2/2] ARM: mach-imx: imx6q: Set system_rev to show soc revision
Robert Karszniewicz
r.karszniewicz at phytec.de
Mon Nov 23 12:08:11 EST 2020
From: Stefan Riedmueller <s.riedmueller at 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 at phytec.de>
Signed-off-by: Robert Karszniewicz <r.karszniewicz at 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
More information about the linux-arm-kernel
mailing list