162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci// 362306a36Sopenharmony_ci// Copyright (c) 2009-2011 Samsung Electronics Co., Ltd. 462306a36Sopenharmony_ci// http://www.samsung.com 562306a36Sopenharmony_ci// 662306a36Sopenharmony_ci// Samsung CPU Support 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#include <linux/module.h> 962306a36Sopenharmony_ci#include <linux/kernel.h> 1062306a36Sopenharmony_ci#include <linux/init.h> 1162306a36Sopenharmony_ci#include <linux/io.h> 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#include "map-base.h" 1462306a36Sopenharmony_ci#include "cpu.h" 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ciunsigned long samsung_cpu_id; 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_civoid __init s3c64xx_init_cpu(void) 1962306a36Sopenharmony_ci{ 2062306a36Sopenharmony_ci samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0x118); 2162306a36Sopenharmony_ci if (!samsung_cpu_id) { 2262306a36Sopenharmony_ci /* 2362306a36Sopenharmony_ci * S3C6400 has the ID register in a different place, 2462306a36Sopenharmony_ci * and needs a write before it can be read. 2562306a36Sopenharmony_ci */ 2662306a36Sopenharmony_ci writel_relaxed(0x0, S3C_VA_SYS + 0xA1C); 2762306a36Sopenharmony_ci samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0xA1C); 2862306a36Sopenharmony_ci } 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id); 3162306a36Sopenharmony_ci pr_err("The platform is deprecated and scheduled for removal. Please reach to the maintainers of the platform and linux-samsung-soc@vger.kernel.org if you still use it. Without such feedback, the platform will be removed after 2022.\n"); 3262306a36Sopenharmony_ci} 33