ARM: tegra: clock: Fix activity monitor resume
Alex Frid [Mon, 12 Mar 2012 19:01:17 +0000 (12:01 -0700)]
Properly restore Tegra3 actmon sampling period after suspend.

Bug 952739

Signed-off-by: Alex Frid <afrid@nvidia.com>
(cherry picked from commit eb6e96a39dbc5d310e8e59046d6e1b787b780e60)

Change-Id: I6a61c2aa1d384a8d17d7ef579000cf59ac218435
Reviewed-on: http://git-master/r/90804
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

arch/arm/mach-tegra/tegra3_actmon.c

index c7aeb9a..43130f9 100644 (file)
@@ -551,6 +551,8 @@ static int actmon_pm_notify(struct notifier_block *nb,
                        actmon_dev_suspend(actmon_devices[i]);
                break;
        case PM_POST_SUSPEND:
+               actmon_writel(actmon_sampling_period - 1,
+                             ACTMON_GLB_PERIOD_CTRL);
                for (i = 0; i < ARRAY_SIZE(actmon_devices); i++)
                        actmon_dev_resume(actmon_devices[i]);
                break;