]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
arm: tegra: powergate: update clk_info in pg_info
authorShreshtha SAHU <ssahu@nvidia.com>
Mon, 20 Oct 2014 07:23:38 +0000 (12:53 +0530)
committerShreshtha Sahu <ssahu@nvidia.com>
Wed, 22 Oct 2014 05:13:30 +0000 (22:13 -0700)
pg_info->clk_info is uninitialized in below call sequence,
  tegraxx_powergate_partition_with_clk_off
   -> partition_clk_disable

when called for first time before calling functions like:
  tegraxx_unpowergate_partition
  tegraxx_powergate_partition

resulting in powergate module to skip turning off the clocks of
device.
This issue was seen in SATA RTPM.

Bug 200037194

Change-Id: Ia73c5a70b29a465d780d0416c742b1aa710d775f
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/559298
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
arch/arm/mach-tegra/powergate-ops-txx.c

index 43a72d12233c11df3ff3ddf224bc08b7008f3c85..ba699940b2aababd92dbd1135b2bba41db3e0147 100644 (file)
@@ -101,6 +101,10 @@ int tegraxx_powergate_partition_with_clk_off(int id,
 {
        int ret = 0;
 
+       /* If first clk_ptr is null, fill clk info for the partition */
+       if (!pg_info->clk_info[0].clk_ptr)
+               get_clk_info(pg_info);
+
        /* Disable clks for the partition */
        partition_clk_disable(pg_info);