]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: fix disable_clk() sequence
authorDeepak Nibade <dnibade@nvidia.com>
Thu, 17 Apr 2014 15:32:18 +0000 (21:02 +0530)
committerTony Ly <tly@nvidia.com>
Mon, 21 Apr 2014 20:00:13 +0000 (13:00 -0700)
nvhost_module_disable_clk() currently first disables the clocks
and then suspends the channels as follows :
clk_disable_unprepare()
nvhost_channel_suspend()

reverse this sequence as below and keep clock disabling after
the channel operations
nvhost_channel_suspend()
clk_disable_unprepare()

Bug 1497798

Change-Id: Ib157606f5dde0495f90d2fa3bd53e5efd9617a49
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/397699
(cherry picked from commit dbc4ee2eb7712ef157ba6982cf8d3cb21ec86b74)
Reviewed-on: http://git-master/r/398145
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
drivers/video/tegra/host/nvhost_acm.c

index 36ddb2a422e33b40b274f7ea6c7cd63dccd5d605..ebbaf119aa7a45c63b0f902446b4db2c8757a772 100644 (file)
@@ -765,12 +765,12 @@ int nvhost_module_disable_clk(struct device *dev)
        if (!pdata)
                return -EINVAL;
 
-       for (index = 0; index < pdata->num_clks; index++)
-               clk_disable_unprepare(pdata->clk[index]);
-
        if (pdata->channel)
                nvhost_channel_suspend(pdata->channel);
 
+       for (index = 0; index < pdata->num_clks; index++)
+               clk_disable_unprepare(pdata->clk[index]);
+
        /* disable parent's clock if required */
        if (dev->parent && dev->parent != &platform_bus)
                nvhost_module_disable_clk(dev->parent);