mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: VFxxx: Display UID information on boot
@ 2019-12-02 14:56 Andrey Smirnov
  2019-12-04  7:23 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Smirnov @ 2019-12-02 14:56 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov, Chris Healy

Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/mach-imx/include/mach/vf610.h | 2 ++
 arch/arm/mach-imx/vf610.c              | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/mach-imx/include/mach/vf610.h b/arch/arm/mach-imx/include/mach/vf610.h
index 6d00d2e45..7ac10a7b1 100644
--- a/arch/arm/mach-imx/include/mach/vf610.h
+++ b/arch/arm/mach-imx/include/mach/vf610.h
@@ -48,4 +48,6 @@ static inline int vf610_cpu_revision(void)
 	return readl(VF610_ROM_VERSION_OFFSET) & 0xff;
 }
 
+u64 vf610_uid(void);
+
 #endif
diff --git a/arch/arm/mach-imx/vf610.c b/arch/arm/mach-imx/vf610.c
index b548cbcb5..2fbd6393e 100644
--- a/arch/arm/mach-imx/vf610.c
+++ b/arch/arm/mach-imx/vf610.c
@@ -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;
 }
-- 
2.21.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: VFxxx: Display UID information on boot
  2019-12-02 14:56 [PATCH] ARM: VFxxx: Display UID information on boot Andrey Smirnov
@ 2019-12-04  7:23 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-12-04  7:23 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: barebox, Chris Healy

On Mon, Dec 02, 2019 at 06:56:03AM -0800, Andrey Smirnov wrote:
> Cc: Chris Healy <cphealy@gmail.com>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  arch/arm/mach-imx/include/mach/vf610.h | 2 ++
>  arch/arm/mach-imx/vf610.c              | 8 ++++++++
>  2 files changed, 10 insertions(+)

Applied, thanks

Sascha

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-04  7:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 14:56 [PATCH] ARM: VFxxx: Display UID information on boot Andrey Smirnov
2019-12-04  7:23 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox