From patchwork Tue Mar 19 02:33:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dahuang@nvidia.com X-Patchwork-Id: 2298521 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 15D01DF215 for ; Tue, 19 Mar 2013 02:44:24 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UHmUe-0004bH-On; Tue, 19 Mar 2013 02:41:40 +0000 Received: from hqemgate03.nvidia.com ([216.228.121.140]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UHmN3-0007P3-Hk for linux-arm-kernel@lists.infradead.org; Tue, 19 Mar 2013 02:33:50 +0000 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate03.nvidia.com id ; Mon, 18 Mar 2013 19:39:05 -0700 Received: from hqemhub03.nvidia.com ([172.17.108.22]) by hqnvupgp07.nvidia.com (PGP Universal service); Mon, 18 Mar 2013 19:33:45 -0700 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Mon, 18 Mar 2013 19:33:45 -0700 Received: from dahuang-vm.nvidia.com (172.20.144.16) by hqemhub03.nvidia.com (172.20.150.15) with Microsoft SMTP Server (TLS) id 8.3.298.1; Mon, 18 Mar 2013 19:33:45 -0700 From: Danny Huang To: , , , , , , , Subject: [PATCH] ARM: tegra: fuse: add fuctions to read speedo id and process id Date: Tue, 19 Mar 2013 10:33:25 +0800 Message-ID: <1363660405-10668-1-git-send-email-dahuang@nvidia.com> X-Mailer: git-send-email 1.8.2 X-NVConfidentiality: public MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130318_223349_729489_91BBD62B X-CRM114-Status: GOOD ( 11.22 ) X-Spam-Score: -9.4 (---------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-9.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [216.228.121.140 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -2.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 Add functions to read the speedo and process id of both cpu and soc. There might be some drivers need the information as well. Signed-off-by: Danny Huang --- arch/arm/mach-tegra/fuse.c | 24 ++++++++++++++++++++++++ include/linux/tegra-soc.h | 6 +++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c index f7db078..f0e356e 100644 --- a/arch/arm/mach-tegra/fuse.c +++ b/arch/arm/mach-tegra/fuse.c @@ -2,6 +2,7 @@ * arch/arm/mach-tegra/fuse.c * * Copyright (C) 2010 Google, Inc. + * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. * * Author: * Colin Cross @@ -161,3 +162,26 @@ unsigned long long tegra_chip_uid(void) return (hi << 32ull) | lo; } EXPORT_SYMBOL(tegra_chip_uid); + +int tegra_get_cpu_process_id(void) +{ + return tegra_cpu_process_id; +} + +int tegra_get_core_process_id(void) +{ + return tegra_core_process_id; +} + +int tegra_get_cpu_speedo_id(void) +{ + if (tegra_chip_id == TEGRA20) + return -EINVAL; + + return tegra_cpu_speedo_id; +} + +int tegra_get_soc_speedo_id(void) +{ + return tegra_soc_speedo_id; +} diff --git a/include/linux/tegra-soc.h b/include/linux/tegra-soc.h index 95f611d..b3e4b74 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,9 @@ #define __LINUX_TEGRA_SOC_H_ u32 tegra_read_chipid(void); +int tegra_get_cpu_process_id(void); +int tegra_get_core_process_id(void); +int tegra_get_cpu_speedo_id(void); +int tegra_get_soc_speedo_id(void); #endif /* __LINUX_TEGRA_SOC_H_ */