[PATCH 07/10] ARM: i.MX: Print "revision unknown" if that is the case

Andrey Smirnov andrew.smirnov at gmail.com
Sat Apr 14 10:50:21 PDT 2018


Printing "revision 16.16" if i.MX SoC's revision is unknown is a bit
confusing so modify the code to actually say "revision unknown" in
such a case.

Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
 arch/arm/mach-imx/imx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/imx.c b/arch/arm/mach-imx/imx.c
index b7465875e..fb1160de9 100644
--- a/arch/arm/mach-imx/imx.c
+++ b/arch/arm/mach-imx/imx.c
@@ -31,7 +31,10 @@ void imx_set_silicon_revision(const char *soc, int revision)
 {
 	__imx_silicon_revision = revision;
 
-	pr_info("detected %s revision %d.%d\n", soc,
+	if (revision == IMX_CHIP_REV_UNKNOWN)
+		pr_info("detected %s revision unknown\n", soc);
+	else
+		pr_info("detected %s revision %d.%d\n", soc,
 			(revision >> 4) & 0xf,
 			revision & 0xf);
 }
-- 
2.14.3




More information about the barebox mailing list