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