public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Danny Huang <dahuang@nvidia.com>
To: <linux@arm.linux.org.uk>, <swarren@wwwdotorg.org>,
	<dahuang@nvidia.com>, <ldewangan@nvidia.com>,
	<pgaikwad@nvidia.com>, <linux-arm-kernel@lists.infradead.org>,
	<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] ARM: tegra: fuse: add fuctions to read speedo id and process id
Date: Tue, 19 Mar 2013 10:33:25 +0800	[thread overview]
Message-ID: <1363660405-10668-1-git-send-email-dahuang@nvidia.com> (raw)

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 <dahuang@nvidia.com>
---
 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 <ccross@android.com>
@@ -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_ */
-- 
1.8.2


             reply	other threads:[~2013-03-19  2:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19  2:33 Danny Huang [this message]
2013-03-19 18:05 ` [PATCH] ARM: tegra: fuse: add fuctions to read speedo id and process id Stephen Warren
2013-03-20  1:39   ` Danny Huang
2013-03-20  1:50     ` Stephen Warren
2013-03-20  2:20       ` Danny Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1363660405-10668-1-git-send-email-dahuang@nvidia.com \
    --to=dahuang@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=pgaikwad@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox