ARM: tegra: clocks: state check in resume
Kaz Fukuoka [Sat, 29 Jun 2013 19:52:03 +0000 (12:52 -0700)]
Check the validity of cl_dvfs state before calling
tegra_cl_dvfs_resume.

Ported from http://git-master/r/193253 (change for Tegra14)
bug 1271462

Change-Id: Ib2c3f6a9ffd0fdcffe979965f6943b2115ef11e8
Signed-off-by: Kaz Fukuoka <kfukuoka@nvidia.com>
Reviewed-on: http://git-master/r/243692
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Prashant Malani <pmalani@nvidia.com>
Tested-by: Prashant Malani <pmalani@nvidia.com>
Reviewed-by: Chao Xu <cxu@nvidia.com>

arch/arm/mach-tegra/tegra12_clocks.c

index 764be04..308d883 100644 (file)
@@ -3739,8 +3739,10 @@ static void tegra12_dfll_clk_resume(struct clk *c)
        if (!(clk_readl(c->reg) & DFLL_BASE_RESET))
                return;         /* already resumed */
 
-       tegra_periph_reset_deassert(c);
-       tegra_cl_dvfs_resume(c->u.dfll.cl_dvfs);
+       if (c->state != UNINITIALIZED) {
+               tegra_periph_reset_deassert(c);
+               tegra_cl_dvfs_resume(c->u.dfll.cl_dvfs);
+       }
 }
 #endif