mmc: msm_sdcc: fix clock gating handling using pwrsave control bit

SDCC controller provides the PWRSAVE control bit to automatically
disable the clock to card when there is no activity with card. SDCC
host controller driver always enables this feature but few SDIO
cards may require the clocks to be always running (even during
inactivity period) to raise the interrupt notification to host so
for such cards, enabling PWRSAVE fature may cause functional failures.

This change checks whether it is ok to gate the card clock before
enabling the PWRSAVE feature.

Change-Id: If36a6a20d59aeb555ece2a6959ab5407f90c787c
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
mmc: core: Fix MMC clock scaling in case of tuning failure

When the clock scaling state is changed from MMC_LOAD_LOW to
MMC_LOAD_HIGH, the clocks are first scaled up and then tuning
is performed. But in case of tuning failure, the current code
does nothing but still retain the previous clock scale stats
(state and curr_freq within struct clk_scaling). Hence, correct
it to scale down the clocks in case of tuning failure so that
clock scaling stats reflect the correct status. This also helps
proceed with data transfers at lower clock rate in such cases.

Change-Id: I7e9379d1e3ddc863132af31019604c22a42f8d59
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>