LOCAL / ARM: SAMSUNG: set chip product id as system_serial
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 18 Apr 2017 01:11:01 +0000 (10:11 +0900)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 07:27:00 +0000 (16:27 +0900)
The Exynos SoC has 64bit chip product id and it is unique for
each chip. So it can be used as system_serial.

Change-Id: Id739b865a1e355a0209841ff2ca1802b5daeabb2
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
arch/arm/plat-samsung/cpu.c

index a107b3a..7e6352e 100644 (file)
@@ -18,6 +18,8 @@
 #include <plat/map-base.h>
 #include <plat/cpu.h>
 
+#include <asm/system_info.h>
+
 unsigned long samsung_cpu_id;
 static unsigned int samsung_cpu_rev;
 
@@ -49,5 +51,8 @@ void __init s5p_init_cpu(const void __iomem *cpuid_addr)
        samsung_cpu_id = readl_relaxed(cpuid_addr);
        samsung_cpu_rev = samsung_cpu_id & 0xFF;
 
+       system_serial_low = __raw_readl(cpuid_addr + 0x14);
+       system_serial_high = __raw_readl(cpuid_addr + 0x18);
+
        pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
 }