diff options
author | Diwakar Tundlam <dtundlam@nvidia.com> | 2013-11-01 15:05:26 -0700 |
---|---|---|
committer | Diwakar Tundlam <dtundlam@nvidia.com> | 2013-11-05 11:08:25 -0800 |
commit | 4492593315345cbd2b7d2eb7976b07d7638aad4c (patch) | |
tree | 2365dbce8322a1bccfaf8d8eb73b48b637a9ada0 /arch/arm/mach-tegra/tegra11_soctherm.c | |
parent | dfa6820c4121d08a3f8d56510bb3bb73e97d8cdc (diff) |
arm: tegra12: soctherm: check for fuse revision
Check CP fuse ATE revision for both old and new formats.
Bug 1399184
Bug 1291108
Change-Id: I26cc6b52210d86a7a320ae121482157b3b6bcf66
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/325766
Diffstat (limited to 'arch/arm/mach-tegra/tegra11_soctherm.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra11_soctherm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/tegra11_soctherm.c b/arch/arm/mach-tegra/tegra11_soctherm.c index 81e911e29f60..2798a1438548 100644 --- a/arch/arm/mach-tegra/tegra11_soctherm.c +++ b/arch/arm/mach-tegra/tegra11_soctherm.c @@ -1862,6 +1862,12 @@ static int soctherm_fuse_read_tsensor(enum soctherm_sense sensor) s16 therm_a, therm_b; s32 div, mult, actual_tsensor_ft, actual_tsensor_cp; int fuse_rev; + u32 base_cp; + s32 shft_cp; + + fuse_rev = tegra_fuse_calib_base_get_cp(&base_cp, &shft_cp); + if (fuse_rev < 0) + return -EINVAL; tegra_fuse_get_tsensor_calib(sensor2tsensorcalib[sensor], &value); @@ -1913,7 +1919,6 @@ static int soctherm_fuse_read_tsensor(enum soctherm_sense sensor) } } else { if (tegra_chip_id == TEGRA_CHIPID_TEGRA12) { - fuse_rev = tegra_fuse_calib_base_get_cp(NULL, NULL); if (fuse_rev == 0) { /* new CP1/CP2 */ t12x_fuse_corr_alpa2[sensor] = t12x_fuse_corr_alpa2[sensor] ?: 1000000; |