scsi: ufs: fix unclocked register access

When we try to update UFS driver's sysfs attribute hibern8_on_idle_delay_ms
(echo <val> > /sys/bus/platform/devices/*.ufshc/hibern8_on_idle_delay_ms)
and if auto-hibern8 is enabled, we try to update the new timeout value into
auto-hibern8 timer register without making sure the controller clocks are
enabled, this may cause the unclocked register access. So we are now
making sure that clocks are enabled and we are also making sure that
there are no transfers active on controller when we modify the auto
hibern8 timeout.

Change-Id: I603b3f405d3a69c594edd45037a2ca4535ebd1ca
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
1 file changed