]> git.baikalelectronics.ru Git - kernel.git/commit
soc: fsl: guts: add serial_number support
authorMichael Walle <michael@walle.cc>
Mon, 4 Apr 2022 09:56:09 +0000 (11:56 +0200)
committerShawn Guo <shawnguo@kernel.org>
Mon, 27 Jun 2022 06:52:02 +0000 (14:52 +0800)
commit4c7bde9dba611bb77bc9b7507c135921923fc9f8
tree9ff890831af67e2bc2241640b2b1a844ac70d465
parentcd5127fc1107934a00504bc8d02c83d5770725a2
soc: fsl: guts: add serial_number support

Most layerscapes provide a security fuse processor where the vendor
will store a unique id per part. Unfortunately, we cannot use the
corresponding efuse driver because this driver needs to be ready
early during the boot phase. To get the unique identifier, we just
need to access two registers. Thus we just search the device tree
for the corresponding device, map its memory to read the id and then
unmap it again.

Because it is likely that the offset within the fuses is dependent
on the SoC, we need a per SoC data. Also, the compatible string is
different among the SoCs. For now, this add support for the LS1028A
SoC.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/soc/fsl/guts.c