LOCAL / ARM: SAMSUNG: set chip product id as system_serial 01/125501/6
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 18 Apr 2017 01:11:01 +0000 (10:11 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 23 Jun 2017 04:58:03 +0000 (04:58 +0000)
The Exynos SoC has 64bit chip product id and it is identical 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 71333bb61013c6f68e5168753fc98dea4def717a..59c0a0c00ec2474d6f2488e268d965db3affccf4 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(void __iomem *cpuid_addr)
        samsung_cpu_id = __raw_readl(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);
 }