Thread (37 messages) 37 messages, 4 authors, 2012-01-06
STALE5279d
Revisions (5)
  1. v1 [diff vs current]
  2. v1 current
  3. v1 [diff vs current]
  4. v1 [diff vs current]
  5. v1 [diff vs current]

[PATCH 4/9] arm/tegra: fuse: add functions to access chip revision

From: Henning Heinold <hidden>
Date: 2011-12-23 10:47:51
Also in: linux-tegra

On Thu, Dec 22, 2011 at 04:17:43PM -0800, Olof Johansson wrote:
quoted hunk ↗ jump to hunk
Add function to get chip revision, and print it out at boot time.

Restructure the fuse access to just use cached variables instead
of always reading the fuses, and export those variables directly
instead of using accessor functions.

Add a SKU ID table of currently known values.

Based on code originally by Colin Cross [off-list ref].

Signed-off-by: Olof Johansson <redacted>
---
 arch/arm/mach-tegra/fuse.c          |   80 +++++++++++++++++++++++------------
 arch/arm/mach-tegra/fuse.h          |   31 +++++++++++--
 arch/arm/mach-tegra/tegra2_clocks.c |    2 +-
 3 files changed, 80 insertions(+), 33 deletions(-)
diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c
index daf3f57..2ddede9 100644
--- a/arch/arm/mach-tegra/fuse.c
+++ b/arch/arm/mach-tegra/fuse.c
@@ -30,20 +30,70 @@
 #define FUSE_SKU_INFO		0x110
 #define FUSE_SPARE_BIT		0x200
 
+int tegra_sku_id;
+int tegra_cpu_process_id;
+int tegra_core_process_id;
+enum tegra_revision tegra_revision;
+
+static const char *tegra_revision_name[TEGRA_REVISION_MAX] = {
+	[TEGRA_REVISION_UNKNOWN] = "unknown",
+	[TEGRA_REVISION_A02]     = "A02",
+	[TEGRA_REVISION_A03]     = "A03",
+	[TEGRA_REVISION_A03p]    = "A03 prime",
+	[TEGRA_REVISION_A04]     = "A04",
+};
+
Hi Olof,

can you please add here [TEGRA_REVISION_A01] = "A01", too. It is used in the nvidia git tree and affects the new beta xorg
driver.

Bye Henning
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help