diff options
author | Alex Frid <afrid@nvidia.com> | 2012-03-09 15:07:00 -0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-04-03 17:54:57 -0700 |
commit | b867f4986fd0952a6614e098ccfefcbf3aef5b2a (patch) | |
tree | 9044afa237650817e8028c2f991876cbf49d7401 /arch/arm/mach-tegra/tegra3_actmon.c | |
parent | dd9f72af7f35191551037062aa7a690687b58696 (diff) |
ARM: tegra: clock: Set EMC and SCLK rates suspend floors
- On suspend entry set EMC rate floor high enough to select PLLM as
EMC clock source, since PLLM is always turned off in suspend.
- On suspend entry set SCLK (AVP) rate floor to speed-up system bus
during save/restore procedures.
Bug 939942
Bug 938649
Reviewed-on: http://git-master/r/89234
(cherry picked from commit ccfdaef143f9017d682af017e11a25c3e5bcf3a7)
Change-Id: I4e1d66521f1f3453502c471999a52637c3d489aa
Signed-off-by: Alex Frid <afrid@nvidia.com>
Signed-off-by: Tom Cherry <tcherry@nvidia.com>
Reviewed-on: http://git-master/r/94124
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra3_actmon.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra3_actmon.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra3_actmon.c b/arch/arm/mach-tegra/tegra3_actmon.c index 43130f960ecd..5df6ed1fc471 100644 --- a/arch/arm/mach-tegra/tegra3_actmon.c +++ b/arch/arm/mach-tegra/tegra3_actmon.c @@ -85,6 +85,10 @@ static u8 actmon_sampling_period; static unsigned long actmon_clk_freq; +/* Maximum frequency EMC is running at when sourced from PLLP. This is + * really a short-cut, but it is true for all Tegra3 platforms + */ +#define EMC_PLLP_FREQ_MAX 204000 /* Units: * - frequency in kHz @@ -102,6 +106,7 @@ struct actmon_dev { unsigned long max_freq; unsigned long target_freq; unsigned long cur_freq; + unsigned long suspend_freq; unsigned long avg_actv_freq; unsigned long avg_band_freq; @@ -404,6 +409,9 @@ static void actmon_dev_suspend(struct actmon_dev *dev) actmon_wmb(); } spin_unlock_irqrestore(&dev->lock, flags); + + if (dev->suspend_freq) + clk_set_rate(dev->clk, dev->suspend_freq * 1000); } static void actmon_dev_resume(struct actmon_dev *dev) @@ -486,6 +494,9 @@ static struct actmon_dev actmon_dev_emc = { .dev_id = "tegra_actmon", .con_id = "emc", + /* EMC suspend floor to guarantee suspend entry on PLLM */ + .suspend_freq = EMC_PLLP_FREQ_MAX + 2000, + .boost_freq_step = 16000, .boost_up_coef = 200, .boost_down_coef = 50, @@ -515,6 +526,9 @@ static struct actmon_dev actmon_dev_avp = { .dev_id = "tegra_actmon", .con_id = "avp", + /* AVP/SCLK suspend activity floor */ + .suspend_freq = 40000, + .boost_freq_step = 8000, .boost_up_coef = 200, .boost_down_coef = 50, |