mmc: core: Fix issue of no clk scaling upon previous scaling failure

If the current partition type is RPMB, clock switching may not
work properly. In this case, clk scaling up would be skipped but
clk_scaling->target_freq has been changed and then discard sub-
sequent clk scaling up requests till meet scaling down. Changing
judgement condition clk_scaling->target_freq == *freq to clk_scaling
->curr_freq == *freq in mmc_devfreq_set_target to avoid this issue.

Change-Id: Id0636e7c792c63156597d5db4e9087bd5fdc2621
Signed-off-by: Ziqi Chen <ziqichen@codeaurora.org>
tirimbino
Ziqi Chen 4 years ago
parent 0d9f71d686
commit efed7cade7
  1. 2
      drivers/mmc/core/core.c

@ -515,7 +515,7 @@ static int mmc_devfreq_set_target(struct device *dev,
*freq, current->comm);
spin_lock_bh(&clk_scaling->lock);
if (clk_scaling->target_freq == *freq ||
if (clk_scaling->curr_freq == *freq ||
clk_scaling->skip_clk_scale_freq_update) {
spin_unlock_bh(&clk_scaling->lock);
goto out;

Loading…
Cancel
Save