From 01a0b8146665a17dd063b4b8e2fe80e5bd795c22 Mon Sep 17 00:00:00 2001 From: Alex Frid Date: Thu, 25 Nov 2010 20:56:57 -0800 Subject: [ARM/tegra] RM: Stopped DVFS in PM_SUSPEND_PREPARE. Bug 760630 Change-Id: If5e4ac1045cdb46d12a03bf47f24fb712fdbd11e Reviewed-on: http://git-master/r/11632 Reviewed-by: Niket Sirsi Tested-by: Niket Sirsi --- arch/arm/mach-tegra/nvrm/core/common/nvrm_power_dfs.c | 9 +++++++-- arch/arm/mach-tegra/nvrm_user.c | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-tegra/nvrm/core/common/nvrm_power_dfs.c b/arch/arm/mach-tegra/nvrm/core/common/nvrm_power_dfs.c index 3107ad526908..4946a6442d93 100644 --- a/arch/arm/mach-tegra/nvrm/core/common/nvrm_power_dfs.c +++ b/arch/arm/mach-tegra/nvrm/core/common/nvrm_power_dfs.c @@ -469,7 +469,6 @@ DvsChangeCpuVoltage( /* * Enable/Disable voltage scaling */ -static void NvRmPrivDvsRun(void); static void NvRmPrivDvsStopAtNominal(void); /* @@ -2549,7 +2548,13 @@ static void NvRmPrivDvsStopAtNominal(void) DvsChangeCpuVoltage(pDfs->hRm, pDvs, pDvs->NominalCpuMv); } -static void NvRmPrivDvsRun(void) +void NvRmPrivDvsStop(void) +{ + NvRmDvs* pDvs = &s_Dfs.VoltageScaler; + pDvs->StopFlag = NV_TRUE; +} + +void NvRmPrivDvsRun(void) { NvRmDvs* pDvs = &s_Dfs.VoltageScaler; pDvs->UpdateFlag = NV_TRUE; diff --git a/arch/arm/mach-tegra/nvrm_user.c b/arch/arm/mach-tegra/nvrm_user.c index db46298bd82d..97e425b46dfd 100644 --- a/arch/arm/mach-tegra/nvrm_user.c +++ b/arch/arm/mach-tegra/nvrm_user.c @@ -63,6 +63,8 @@ static long nvrm_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg); static int nvrm_mmap(struct file *file, struct vm_area_struct *vma); extern void reset_cpu(unsigned int cpu, unsigned int reset); +extern void NvRmPrivDvsStop(void); +extern void NvRmPrivDvsRun(void); //Variables for AVP suspend operation extern NvRmDeviceHandle s_hRmGlobal; @@ -611,12 +613,14 @@ int tegra_pm_notifier(struct notifier_block *nb, notify_daemon(STRING_PM_DISPLAY_OFF); #endif notify_daemon(STRING_PM_SUSPEND_PREPARE); + NvRmPrivDvsStop(); break; case PM_POST_SUSPEND: notify_daemon(STRING_PM_POST_SUSPEND); #ifndef CONFIG_HAS_EARLYSUSPEND notify_daemon(STRING_PM_DISPLAY_ON); #endif + NvRmPrivDvsRun(); break; default: printk(KERN_ERR "%s: unknown event %ld\n", __func__, event); -- cgit v1.2.3