ARM: tegra11: clock: Relax CPU rate increase warning check
Alex Frid [Sun, 17 Feb 2013 08:50:05 +0000 (00:50 -0800)]
Do not generate warning on CPU rate increase before dvfs regulators
are connected if target rate is below boot rate.

Change-Id: Ic8357f781029d4dab169b22a08333ff5b9472847
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/201539
(cherry picked from commit ddef76dab4a6a6142497189fa3d0d6a27d8b31d1)
Reviewed-on: http://git-master/r/203620
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>

arch/arm/mach-tegra/tegra11_clocks.c

index dbd10b8..c07cd1e 100644 (file)
@@ -1247,7 +1247,8 @@ static int tegra11_cpu_clk_set_rate(struct clk *c, unsigned long rate)
        if (c->dvfs) {
                if (!c->dvfs->dvfs_rail)
                        return -ENOSYS;
-               else if ((!c->dvfs->dvfs_rail->reg) && (old_rate < rate)) {
+               else if ((!c->dvfs->dvfs_rail->reg) && (old_rate < rate) &&
+                        (c->boot_rate < rate)) {
                        WARN(1, "Increasing CPU rate while regulator is not"
                                " ready is not allowed\n");
                        return -ENOSYS;