public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: tegra: fuse: add fuctions to read speedo id and process id
@ 2013-03-19  2:33 Danny Huang
  2013-03-19 18:05 ` Stephen Warren
  0 siblings, 1 reply; 5+ messages in thread
From: Danny Huang @ 2013-03-19  2:33 UTC (permalink / raw)
  To: linux-lFZ/pmaqli7XmaaqVzeoHQ, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	dahuang-DDmLM1+adcrQT0dZR+AlfA, ldewangan-DDmLM1+adcrQT0dZR+AlfA,
	pgaikwad-DDmLM1+adcrQT0dZR+AlfA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 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-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
@@ -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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-20  2:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-19  2:33 [PATCH] ARM: tegra: fuse: add fuctions to read speedo id and process id Danny Huang
2013-03-19 18:05 ` Stephen Warren
     [not found]   ` <5148A8D6.8000002-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-20  1:39     ` Danny Huang
2013-03-20  1:50       ` Stephen Warren
     [not found]         ` <514915DB.8060206-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-20  2:20           ` Danny Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox