arm: tegra: update power state residency
Prashant Gaikwad [Thu, 19 Sep 2013 08:12:05 +0000 (13:12 +0530)]
Update minimum residency expected for different power
states as derived from analysis done in bug 1347388

Bug 1347388

Change-Id: Ifd3d1e68d58a3c0bf5015b33be5ed8c926dd1e91
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/299462
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

arch/arm/mach-tegra/board-ardbeg-power.c
arch/arm/mach-tegra/pm.c
arch/arm/mach-tegra/pm.h

index 10519ae..5963e25 100644 (file)
@@ -702,6 +702,10 @@ static struct tegra_suspend_platform_data ardbeg_suspend_data = {
        .corereq_high   = true,
        .sysclkreq_high = true,
        .cpu_lp2_min_residency = 1000,
+       .min_residency_vmin_fmin = 1000,
+       .min_residency_ncpu_fast = 8000,
+       .min_residency_ncpu_slow = 5000,
+       .min_residency_mclk_stop = 5000,
        .min_residency_crail = 20000,
 };
 
index 512f072..6d9d774 100644 (file)
@@ -331,9 +331,13 @@ unsigned long tegra_cpu_lp2_min_residency(void)
        return pdata->cpu_lp2_min_residency;
 }
 
+#define TEGRA_MIN_RESIDENCY_MCLK_STOP  20000
+
 unsigned long tegra_mc_clk_stop_min_residency(void)
 {
-       return 20000;
+       return pdata && pdata->min_residency_mclk_stop
+                       ? pdata->min_residency_mclk_stop
+                       : TEGRA_MIN_RESIDENCY_MCLK_STOP;
 }
 
 #ifdef CONFIG_ARCH_TEGRA_HAS_SYMMETRIC_CPU_PWR_GATE
@@ -1669,7 +1673,7 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat)
                pdata->min_residency_crail = plat->min_residency_crail;
                pdata->crail_up_early = plat->crail_up_early;
 #endif
-               pdata->min_residency_mc_clk = plat->min_residency_mc_clk;
+               pdata->min_residency_mclk_stop = plat->min_residency_mclk_stop;
                pdata->usb_vbus_internal_wake = plat->usb_vbus_internal_wake;
                pdata->usb_id_internal_wake = plat->usb_id_internal_wake;
                pdata->suspend_dfll_bypass = plat->suspend_dfll_bypass;
index 4a9b133..6c652c9 100644 (file)
@@ -82,7 +82,7 @@ struct tegra_suspend_platform_data {
        unsigned long min_residency_crail;
        bool crail_up_early;
 #endif
-       unsigned long min_residency_mc_clk;
+       unsigned long min_residency_mclk_stop;
        bool usb_vbus_internal_wake; /* support for internal vbus wake */
        bool usb_id_internal_wake; /* support for internal id wake */