[PATCH] ARM: mach-imx: set system_serial from ocotp registers

Arnd Bergmann arnd at kernel.org
Thu Nov 26 14:35:24 EST 2020


On Thu, Nov 26, 2020 at 4:28 PM Robert Karszniewicz
<r.karszniewicz at phytec.de> wrote:
>
> From: Stefan Christ <s.christ at phytec.de>
>
> The i.MX6 fuses have two 32 bit registers (OCOTP_CFG0 and OCOTP_CFG1)
> that contain an 64 bit unique id. Use them to setup the system serial,
> which can be seen in '/proc/cpuinfo'.
>
> Signed-off-by: Stefan Christ <s.christ at phytec.de>
> Signed-off-by: Yunus Bas <y.bas at phytec.de>
> Cc: Stefan Lengfeld <contact at stefanchrist.eu>
> Signed-off-by: Robert Karszniewicz <r.karszniewicz at phytec.de>
> ---
> Hello,
>
> I've noticed that arch/arm/mach-imx/ocotp.c duplicates functionality of
> drivers/soc/imx/soc-imx.c . Should this be resolved?

I think it would be best to just have drivers/soc/imx/soc-imx.c
and not add another one. In particular, the serial number is
not normally exposed through system_serial_low/system_serial_high
these days, but rather the architecture-independent soc device.

Looking at that driver though, I see it still has a bug in that
it creates a bogus soc_device on most (non-imx) machines.
I think there was a fix a while ago, but it never got merged.

        Arnd



More information about the linux-arm-kernel mailing list