diff options
author | Diwakar Tundlam <dtundlam@nvidia.com> | 2014-05-05 16:10:57 -0700 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-05-07 12:10:44 -0700 |
commit | 5adedff5b2f46b07c01286bebbad12c17f7a47bf (patch) | |
tree | 2b3ae31ef3f8049177db9b959db5a5d7ca084a72 /arch | |
parent | a5f6618850714d1fa66586e1ad629642b3b7ed3d (diff) |
arm: tegra: thermal: clean up fuse check apis
Allow fuse check api to be called only to check the fuse revision.
Bug 1429685
Change-Id: I0370f237c4562814af0f41a162bccff2b3db5371
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/405474
Reviewed-on: http://git-master/r/405990
Reviewed-by: Riham Haidar <rhaidar@nvidia.com>
Tested-by: Riham Haidar <rhaidar@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/board-ardbeg-power.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-ardbeg-sensors.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-loki-power.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-norrin-power.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/tegra11_soctherm.c | 10 |
5 files changed, 14 insertions, 24 deletions
diff --git a/arch/arm/mach-tegra/board-ardbeg-power.c b/arch/arm/mach-tegra/board-ardbeg-power.c index a5343abdd1da..08ed22817cf2 100644 --- a/arch/arm/mach-tegra/board-ardbeg-power.c +++ b/arch/arm/mach-tegra/board-ardbeg-power.c @@ -717,8 +717,7 @@ static struct soctherm_throttle voltmon_throttle = { int __init ardbeg_soctherm_init(void) { - s32 base_cp, shft_cp; - u32 base_ft, shft_ft; + int cp_rev, ft_rev; struct board_info pmu_board_info; struct board_info board_info; enum soctherm_therm_id therm_cpu; @@ -731,6 +730,9 @@ int __init ardbeg_soctherm_init(void) ardbeg_therm_pop, sizeof(ardbeg_therm_pop)); } + cp_rev = tegra_fuse_calib_base_get_cp(NULL, NULL); + ft_rev = tegra_fuse_calib_base_get_ft(NULL, NULL); + /* Bowmore and P1761 are T132 platforms: ATE rev check (TODO) */ if (board_info.board_id == BOARD_E1971 || board_info.board_id == BOARD_P1761 || @@ -747,8 +749,7 @@ int __init ardbeg_soctherm_init(void) } /* do this only for supported CP,FT fuses */ - if ((tegra_fuse_calib_base_get_cp(&base_cp, &shft_cp) >= 0) && - (tegra_fuse_calib_base_get_ft(&base_ft, &shft_ft) >= 0)) { + if ((cp_rev >= 0) && (ft_rev >= 0)) { tegra_platform_edp_init( ardbeg_soctherm_data.therm[therm_cpu].trips, &ardbeg_soctherm_data.therm[therm_cpu].num_trips, diff --git a/arch/arm/mach-tegra/board-ardbeg-sensors.c b/arch/arm/mach-tegra/board-ardbeg-sensors.c index d720850f2eec..c22b74c277e6 100644 --- a/arch/arm/mach-tegra/board-ardbeg-sensors.c +++ b/arch/arm/mach-tegra/board-ardbeg-sensors.c @@ -1673,8 +1673,6 @@ static struct i2c_board_info ardbeg_i2c_nct72_board_info[] = { static int ardbeg_nct72_init(void) { - s32 base_cp, shft_cp; - u32 base_ft, shft_ft; int nct72_port = TEGRA_GPIO_PI6; int ret = 0; int i; @@ -1683,8 +1681,8 @@ static int ardbeg_nct72_init(void) tegra_get_board_info(&board_info); /* raise NCT's thresholds if soctherm CP,FT fuses are ok */ - if ((tegra_fuse_calib_base_get_cp(&base_cp, &shft_cp) >= 0) && - (tegra_fuse_calib_base_get_ft(&base_ft, &shft_ft) >= 0)) { + if ((tegra_fuse_calib_base_get_cp(NULL, NULL) >= 0) && + (tegra_fuse_calib_base_get_ft(NULL, NULL) >= 0)) { ardbeg_nct72_pdata.sensors[EXT].shutdown_limit += 20; for (i = 0; i < ardbeg_nct72_pdata.sensors[EXT].num_trips; i++) { diff --git a/arch/arm/mach-tegra/board-loki-power.c b/arch/arm/mach-tegra/board-loki-power.c index 18565d4763b4..fa39f36cc8a9 100644 --- a/arch/arm/mach-tegra/board-loki-power.c +++ b/arch/arm/mach-tegra/board-loki-power.c @@ -1038,12 +1038,9 @@ static struct soctherm_platform_data loki_soctherm_data = { int __init loki_soctherm_init(void) { - s32 base_cp, shft_cp; - u32 base_ft, shft_ft; - /* do this only for supported CP,FT fuses */ - if ((tegra_fuse_calib_base_get_cp(&base_cp, &shft_cp) >= 0) && - (tegra_fuse_calib_base_get_ft(&base_ft, &shft_ft) >= 0)) { + if ((tegra_fuse_calib_base_get_cp(NULL, NULL) >= 0) && + (tegra_fuse_calib_base_get_ft(NULL, NULL) >= 0)) { tegra_platform_edp_init( loki_soctherm_data.therm[THERM_CPU].trips, &loki_soctherm_data.therm[THERM_CPU].num_trips, diff --git a/arch/arm/mach-tegra/board-norrin-power.c b/arch/arm/mach-tegra/board-norrin-power.c index 78709dcf818a..4afd7c760b9f 100644 --- a/arch/arm/mach-tegra/board-norrin-power.c +++ b/arch/arm/mach-tegra/board-norrin-power.c @@ -285,8 +285,6 @@ static struct soctherm_platform_data norrin_soctherm_data = { int __init norrin_soctherm_init(void) { - s32 base_cp, shft_cp; - u32 base_ft, shft_ft; struct board_info pmu_board_info; struct board_info board_info; enum soctherm_therm_id therm_cpu; @@ -297,8 +295,8 @@ int __init norrin_soctherm_init(void) therm_cpu = THERM_PLL; /* do this only for supported CP,FT fuses */ - if ((tegra_fuse_calib_base_get_cp(&base_cp, &shft_cp) >= 0) && - (tegra_fuse_calib_base_get_ft(&base_ft, &shft_ft) >= 0)) { + if ((tegra_fuse_calib_base_get_cp(NULL, NULL) >= 0) && + (tegra_fuse_calib_base_get_ft(NULL, NULL) >= 0)) { tegra_platform_edp_init( norrin_soctherm_data.therm[therm_cpu].trips, &norrin_soctherm_data.therm[therm_cpu].num_trips, diff --git a/arch/arm/mach-tegra/tegra11_soctherm.c b/arch/arm/mach-tegra/tegra11_soctherm.c index 8ef29964fcc6..351bb854b7e5 100644 --- a/arch/arm/mach-tegra/tegra11_soctherm.c +++ b/arch/arm/mach-tegra/tegra11_soctherm.c @@ -1447,12 +1447,10 @@ static int soctherm_bind(struct thermal_zone_device *thz, int i; struct soctherm_therm *therm = thz->devdata; struct thermal_trip_info *trip_state; - u32 base_cp, base_ft; - s32 shft_cp, shft_ft; /* skip binding cooling devices on improperly fused soctherm */ - if (tegra_fuse_calib_base_get_cp(&base_cp, &shft_cp) < 0 || - tegra_fuse_calib_base_get_ft(&base_ft, &shft_ft) < 0) + if (tegra_fuse_calib_base_get_cp(NULL, NULL) < 0 || + tegra_fuse_calib_base_get_ft(NULL, NULL) < 0) return 0; for (i = 0; i < therm->num_trips; i++) { @@ -2753,11 +2751,9 @@ 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; struct soctherm_fuse_correction_war *war; - fuse_rev = tegra_fuse_calib_base_get_cp(&base_cp, &shft_cp); + fuse_rev = tegra_fuse_calib_base_get_cp(NULL, NULL); if (fuse_rev < 0) return fuse_rev; pr_debug("%s: fuse_rev %d\n", __func__, fuse_rev); |