arm: tegra: fuse: add api for chip minor revision
Naveen Kumar S [Thu, 4 Jul 2013 16:10:06 +0000 (21:10 +0530)]
Added function tegra_get_minor_rev() to return minor revision number
of the chip.

Bug 1166110

Change-Id: I087331433cabb35c05fa2ce0bd53013b6fb6624f
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/245330
(cherry picked from commit f29df745d2e97c0feb5f9c195202ca55041fa14c)
Reviewed-on: http://git-master/r/251206
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bryan Wu <pengw@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

arch/arm/mach-tegra/include/mach/hardware.h
arch/arm/mach-tegra/tegra_fuse.c

index 38fb699..78bdc1e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Google, Inc.
- * Copyright (C) 2011-2012 NVIDIA Corp.
+ * Copyright (c) 2011-2013 NVIDIA CORPORATION. All rights reserved.
  *
  * Author:
  *     Colin Cross <ccross@google.com>
@@ -59,6 +59,7 @@ enum tegra_platform {
 
 extern enum tegra_revision tegra_revision;
 enum tegra_chipid tegra_get_chipid(void);
+unsigned int tegra_get_minor_rev(void);
 
 #ifdef CONFIG_TEGRA_SIMULATION_SPLIT_MEM
 int tegra_split_mem_active(void);
index e1a7edc..1260813 100644 (file)
@@ -513,6 +513,14 @@ enum tegra_revision tegra_get_revision(void)
        return tegra_id.revision;
 }
 
+unsigned int tegra_get_minor_rev(void)
+{
+       if (tegra_id.chipid == TEGRA_CHIPID_UNKNOWN)
+               tegra_get_tegraid_from_hw();
+
+       return tegra_id.minor;
+}
+
 #ifdef CONFIG_TEGRA_PRE_SILICON_SUPPORT
 void tegra_get_netlist_revision(u32 *netlist, u32 *patchid)
 {