From patchwork Thu Dec 19 12:36:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 3379221 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7A1539F314 for ; Thu, 19 Dec 2013 12:37:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E52F20644 for ; Thu, 19 Dec 2013 12:37:53 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 001C52060F for ; Thu, 19 Dec 2013 12:37:51 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vtcr0-0003iT-H8; Thu, 19 Dec 2013 12:37:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vtcqp-0007B0-AJ; Thu, 19 Dec 2013 12:37:15 +0000 Received: from hqemgate16.nvidia.com ([216.228.121.65]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vtcqk-00078v-0N for linux-arm-kernel@lists.infradead.org; Thu, 19 Dec 2013 12:37:10 +0000 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com id ; Thu, 19 Dec 2013 04:36:47 -0800 Received: from hqemhub03.nvidia.com ([172.20.12.94]) by hqnvupgp07.nvidia.com (PGP Universal service); Thu, 19 Dec 2013 04:38:51 -0800 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Thu, 19 Dec 2013 04:38:51 -0800 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQEMHUB03.nvidia.com (172.20.150.15) with Microsoft SMTP Server id 8.3.327.1; Thu, 19 Dec 2013 04:36:47 -0800 Received: from sc-daphne.nvidia.com (Not Verified[172.20.232.60]) by hqnvemgw01.nvidia.com with MailMarshal (v7,1,2,5326) id ; Thu, 19 Dec 2013 04:36:47 -0800 Received: from [127.0.1.1] (tamien.nvidia.com [172.17.186.57]) by sc-daphne.nvidia.com (8.13.8+Sun/8.8.8) with ESMTP id rBJCal09011990; Thu, 19 Dec 2013 04:36:47 -0800 (PST) Subject: [PATCH 1/6] ARM: tegra: fuse: add functions to read speedo ID and process ID From: Paul Walmsley To: , Date: Thu, 19 Dec 2013 04:36:47 -0800 Message-ID: <20131219123639.3226.75285.stgit@tamien> In-Reply-To: <20131219122857.3226.42830.stgit@tamien> References: <20131219122857.3226.42830.stgit@tamien> User-Agent: StGit/0.17.1-1-g74fd MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131219_073710_156375_795EBB4E X-CRM114-Status: GOOD ( 14.02 ) X-Spam-Score: -2.4 (--) Cc: Danny Huang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Danny Huang Add functions to read the speedo and process id of both the CPU and the SoC. There might be some drivers need the information as well. Signed-off-by: Danny Huang [pwalmsley@nvidia.com: cleaned up the patch description; removed functions not used by the DFLL code for now] Signed-off-by: Paul Walmsley --- arch/arm/mach-tegra/fuse.c | 15 +++++++++++++++ include/linux/tegra-soc.h | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c index c9ac23b385be..e3ca8abe858f 100644 --- a/arch/arm/mach-tegra/fuse.c +++ b/arch/arm/mach-tegra/fuse.c @@ -250,3 +250,18 @@ void __init tegra_init_fuse(void) tegra_sku_id, tegra_cpu_process_id, tegra_core_process_id); } + +int tegra_get_cpu_process_id(void) +{ + return tegra_cpu_process_id; +} +EXPORT_SYMBOL(tegra_get_cpu_process_id); + +int tegra_get_cpu_speedo_id(void) +{ + if (tegra_chip_id == TEGRA20) + return -EINVAL; + + return tegra_cpu_speedo_id; +} +EXPORT_SYMBOL(tegra_get_cpu_speedo_id); diff --git a/include/linux/tegra-soc.h b/include/linux/tegra-soc.h index 95f611d78f3a..ec856fdf2ce7 100644 --- a/include/linux/tegra-soc.h +++ b/include/linux/tegra-soc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2012-2013 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -18,5 +18,7 @@ #define __LINUX_TEGRA_SOC_H_ u32 tegra_read_chipid(void); +int tegra_get_cpu_process_id(void); +int tegra_get_cpu_speedo_id(void); #endif /* __LINUX_TEGRA_SOC_H_ */