1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun // 3*4882a593Smuzhiyun // Copyright (c) 2009-2011 Samsung Electronics Co., Ltd. 4*4882a593Smuzhiyun // http://www.samsung.com 5*4882a593Smuzhiyun // 6*4882a593Smuzhiyun // Samsung CPU Support 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun #include <linux/module.h> 9*4882a593Smuzhiyun #include <linux/kernel.h> 10*4882a593Smuzhiyun #include <linux/init.h> 11*4882a593Smuzhiyun #include <linux/io.h> 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun #include <mach/map-base.h> 14*4882a593Smuzhiyun #include "cpu.h" 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun unsigned long samsung_cpu_id; 17*4882a593Smuzhiyun s3c64xx_init_cpu(void)18*4882a593Smuzhiyunvoid __init s3c64xx_init_cpu(void) 19*4882a593Smuzhiyun { 20*4882a593Smuzhiyun samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0x118); 21*4882a593Smuzhiyun if (!samsung_cpu_id) { 22*4882a593Smuzhiyun /* 23*4882a593Smuzhiyun * S3C6400 has the ID register in a different place, 24*4882a593Smuzhiyun * and needs a write before it can be read. 25*4882a593Smuzhiyun */ 26*4882a593Smuzhiyun writel_relaxed(0x0, S3C_VA_SYS + 0xA1C); 27*4882a593Smuzhiyun samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0xA1C); 28*4882a593Smuzhiyun } 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id); 31*4882a593Smuzhiyun } 32