summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVeerabhadrarao Badiganti <vbadigan@codeaurora.org>2017-05-30 20:34:46 +0530
committerVeerabhadrarao Badiganti <vbadigan@codeaurora.org>2017-06-02 23:14:56 +0530
commit70bc2b791f1b2f801331b6764fd9566c61588f1b (patch)
tree900d65ace71d46f20ad05e0e79fb578c309031c0
parent28bf2d8b6bd153bb3a27ec871115d76f6a94b97e (diff)
mmc: sdhci-msm: Store clock scaling frequencies in a dedicated table
Use a separate table to store the platform specific clock-scaling frequencies. The generic table where these frequencies used to be stored, would get updated (in some cases) during clock scaling initialization. But when a new card is inserted (In the case of a removable card), the frequencies supported by the card should be compared against the platform specific frequencies. By storing these values in a separate table, these values would remain intact and this table can be used for initializing the generic table during clock-scaling initialization. Change-Id: I5729f18a975f849bc2965a946473a9cdbd81e94a Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
-rw-r--r--drivers/mmc/host/sdhci-msm.c10
-rw-r--r--include/linux/mmc/host.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index ca72ebfd55a3..1eeab7db9722 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -1837,13 +1837,13 @@ struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev,
}
if (sdhci_msm_dt_get_array(dev, "qcom,devfreq,freq-table",
- &msm_host->mmc->clk_scaling.freq_table,
- &msm_host->mmc->clk_scaling.freq_table_sz, 0))
+ &msm_host->mmc->clk_scaling.pltfm_freq_table,
+ &msm_host->mmc->clk_scaling.pltfm_freq_table_sz, 0))
pr_debug("%s: no clock scaling frequencies were supplied\n",
dev_name(dev));
- else if (!msm_host->mmc->clk_scaling.freq_table ||
- !msm_host->mmc->clk_scaling.freq_table_sz)
- dev_err(dev, "bad dts clock scaling frequencies\n");
+ else if (!msm_host->mmc->clk_scaling.pltfm_freq_table ||
+ !msm_host->mmc->clk_scaling.pltfm_freq_table_sz)
+ dev_err(dev, "bad dts clock scaling frequencies\n");
/*
* Few hosts can support DDR52 mode at the same lower
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index d9e12c1b1748..279411c42ded 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -330,7 +330,9 @@ struct mmc_devfeq_clk_scaling {
atomic_t devfreq_abort;
bool skip_clk_scale_freq_update;
int freq_table_sz;
+ int pltfm_freq_table_sz;
u32 *freq_table;
+ u32 *pltfm_freq_table;
unsigned long total_busy_time_us;
unsigned long target_freq;
unsigned long curr_freq;