When comparing the peak thermal floor voltage for the CPU between
Linux v3.10 and v4.4 there is a delta of 7mV (957mV versus 950mv).
This is because the peak thermal floor voltage for CPU in Linux
v4.4 is not rounded up where as it is in Linux v3.10. Align Linux
v4.4 with v3.10 by rounding up the peak thermal floor voltage.
Also given that there is both a tegra_dfll_get_thermal_floor()
and tegra_dfll_get_thermal_floor_mv(), update the name of the
tegra_dfll_get_thermal_floor() to be
tegra_dfll_get_peak_thermal_floor_mv() so it is clear what the
difference is.
Bug
1811732
Change-Id: Icc093e88c1421be2ca55325569187e92ab733259
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: http://git-master/r/
1284920
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
}
EXPORT_SYMBOL(tegra_dfll_get_thermal_floor_mv);
+/**
+ * tegra_dfll_get_peak_thermal_floor_mv - get millivolts of peak thermal floor
+ */
+u32 tegra_dfll_get_peak_thermal_floor_mv(void)
+{
+ int mv = tegra_dfll_dev->soc->thermal_floor_table[0].millivolts;
+
+ return tegra_round_voltage(mv, &tegra_dfll_dev->soc->alignment, 1);
+}
+EXPORT_SYMBOL(tegra_dfll_get_peak_thermal_floor_mv);
+
/**
* tegra_dfll_get_thermal_index - return millivolts of thermal cap
*/
}
EXPORT_SYMBOL(tegra_dfll_get_min_millivolts);
-/**
- * tegra_dfll_get_thermal_floor - return millivolts for thermal floor
- */
-u32 tegra_dfll_get_thermal_floor(int index)
-{
- return tegra_dfll_dev->soc->thermal_floor_table[index].millivolts;
-}
-EXPORT_SYMBOL(tegra_dfll_get_thermal_floor);
-
/**
* tegra_dfll_get_alignment - return DFLL alignment
*/
if (!dfll_range && d->dvfs_rail->therm_floors)
return d->dvfs_rail->therm_floors[0].mv;
if (dfll_range)
- return tegra_dfll_get_thermal_floor(0);
+ return tegra_dfll_get_peak_thermal_floor_mv();
return 0;
}
extern int tegra_dfll_count_thermal_states(struct tegra_dfll *td,
enum tegra_dfll_thermal_type type);
u32 tegra_dfll_get_thermal_floor_mv(void);
+u32 tegra_dfll_get_peak_thermal_floor_mv(void);
u32 tegra_dfll_get_thermal_cap_mv(void);
-u32 tegra_dfll_get_thermal_floor(int index);
u32 tegra_dfll_get_min_millivolts(void);
struct rail_alignment *tegra_dfll_get_alignment(void);
#endif