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

Robert Karszniewicz r.karszniewicz at phytec.de
Fri Nov 27 12:12:25 EST 2020


Hello Arnd and Stefan,

On 11/26/20 8:35 PM, Arnd Bergmann wrote:
> 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.

I've done a bit more research and I think I understand better now.

In the same vein, our patch
"[PATCH 1/2] ARM: mach-imx: imx6ul: Print SOC revision on boot and set
system_rev"[1]
should drop the line where system_rev is set, and only 
imx_print_silicon_rev()
should be kept? And the second patch in that series should be dropped, too.

Thank you for your replies, the both of you.

[1] 
http://lists.infradead.org/pipermail/linux-arm-kernel/2020-November/620524.html

> 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.
Just interested; Is there somewhere I can read more about that bug/fix?

Regards,
Robert



More information about the linux-arm-kernel mailing list