mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
mmc: core: Fix clk scaling when card max freq below 50MHz
When card max supported clk frequency is less than 50MHz, driver registers scale up frequency as 0 and scale down frequency as max card supported clk frequency. So read/write during high load performace is dropping. Ideally in this scenario, clk scaling could be disabled by skipping registration with devfreq, but userspace might see scaling supported for some card and its not supported for another which might create confusion. Hence keeping low and high, clk scaling frequency as same, and scaling would be skipped when devfreq attempts to scale the clk. Change-Id: I25977bdff4275c4ebec7309952029f43e0d2455f Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
This commit is contained in:
parent
a2839ca38b
commit
03454835bd
1 changed files with 6 additions and 0 deletions
|
|
@ -612,6 +612,12 @@ static int mmc_devfreq_create_freq_table(struct mmc_host *host)
|
|||
break;
|
||||
}
|
||||
|
||||
if (mmc_card_sd(host->card) && (clk_scaling->freq_table_sz < 2)) {
|
||||
clk_scaling->freq_table[clk_scaling->freq_table_sz] =
|
||||
host->card->clk_scaling_highest;
|
||||
clk_scaling->freq_table_sz++;
|
||||
}
|
||||
|
||||
out:
|
||||
/**
|
||||
* devfreq requires unsigned long type freq_table while the
|
||||
|
|
|
|||
Loading…
Reference in a new issue