Skip to contentSkip to conversation

ARM: VFxxx: Display UID information on boot

PATCH Applied Andrey Smirnov 2 participants 2 messages Dec 2, 2019 – Dec 4, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: VFxxx: Display UID information on boot

Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
---
 arch/arm/mach-imx/include/mach/vf610.h | 2 ++
 arch/arm/mach-imx/vf610.c              | 8 ++++++++
 2 files changed, 10 insertions(+)
arch/arm/mach-imx/include/mach/vf610.h +2 -0
index 6d00d2e45..7ac10a7b1 100644
@@ -48,4 +48,6 @@ static inline int vf610_cpu_revision(void)
 	return readl(VF610_ROM_VERSION_OFFSET) & 0xff;
 }
 
+u64 vf610_uid(void);
+
 #endif
arch/arm/mach-imx/vf610.c +8 -0
index b548cbcb5..2fbd6393e 100644
@@ -19,6 +19,7 @@
 #include <mach/revision.h>
 #include <mach/vf610.h>
 #include <mach/reset-reason.h>
+#include <mach/ocotp.h>
 
 static const struct imx_reset_reason vf610_reset_reasons[] = {
 	{ VF610_SRC_SRSR_POR_RST,       RESET_POR,   0 },
@@ -30,6 +31,11 @@ static const struct imx_reset_reason vf610_reset_reasons[] = {
 	{ /* sentinel */ }
 };
 
+u64 vf610_uid(void)
+{
+	return imx_ocotp_read_uid(IOMEM(VF610_OCOTP_BASE_ADDR));
+}
+
 int vf610_init(void)
 {
 	const char *cputypestr;
@@ -57,5 +63,7 @@ int vf610_init(void)
 
 	imx_set_silicon_revision(cputypestr, vf610_cpu_revision());
 	imx_set_reset_reason(src + IMX_SRC_SRSR, vf610_reset_reasons);
+	pr_info("%s unique ID: %llx\n", cputypestr, vf610_uid());
+
 	return 0;
 }
Signature · 7 lines
2.21.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer Applied
#1 lore raw
Quoted 7 lines · Andrey Smirnov
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
---
 arch/arm/mach-imx/include/mach/vf610.h | 2 ++
 arch/arm/mach-imx/vf610.c              | 8 ++++++++
 2 files changed, 10 insertions(+)

Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox