diff options
author | Alex Frid <afrid@nvidia.com> | 2013-10-07 17:17:47 -0700 |
---|---|---|
committer | Yu-Huan Hsu <yhsu@nvidia.com> | 2013-10-22 16:57:55 -0700 |
commit | bfb5bdba51421001df1e2bc7573d114c9846bf0a (patch) | |
tree | 7468d8beffc40af0706919e93a3f3de7b6881aac /arch/arm/mach-tegra/edp.c | |
parent | d310995d3a2473452b09a00e57001d76ff02ba9e (diff) |
ARM: tegra: dvfs: Add predict peak voltage interface
With introduction of thermal dvfs, frequency-to-voltage mapping may
be changed at run time with temperature. Therefore, s/w layers that
rely on inverse voltage-to-frequency tables to determine frequency
caps, should use peak voltages across all thermal dvfs ranges. Hence,
this commit:
- added the respective peak_millivolts entry in dvfs structure
- added tetra_dvfs_predict_peak_millivolts() interface
- modified EDP table calculation to use peak voltage prediction
- modified core cap table construction to use peak voltage prediction,
changed warning reported when voltage for minimum frequency is above
core Vmin to info - this maybe true in some thermal dvfs range
- modified override range calculation to use peak voltage prediction,
added dvfs safe-guard in rail override mode to make sure that override
limit is not violated in any thermal range
For now, dvfs peak millivolts entries are not populated at all, and
predicted peak voltage are based on dvfs table active at the moment in
current thermal range (the same as standard predict voltage interface).
Bug 1307919
Change-Id: Ia8d962c66efbcb98d227dab55b36bbba8d93ef5f
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/289480
Reviewed-on: http://git-master/r/298527
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/edp.c')
-rw-r--r-- | arch/arm/mach-tegra/edp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/edp.c b/arch/arm/mach-tegra/edp.c index 25a803cbd5ab..def33c79aa87 100644 --- a/arch/arm/mach-tegra/edp.c +++ b/arch/arm/mach-tegra/edp.c @@ -232,7 +232,8 @@ static int edp_relate_freq_voltage(struct clk *clk_cpu_g, i++, freq += FREQ_STEP) { /* Predict voltages */ - voltage_mV = tegra_dvfs_predict_millivolts(clk_cpu_g, freq); + voltage_mV = tegra_dvfs_predict_peak_millivolts( + clk_cpu_g, freq); if (voltage_mV < 0) { pr_err("%s: couldn't predict voltage: freq %u; err %d", __func__, freq, voltage_mV); |