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>
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);