mmc: sdhci: add dynamic Qos for cpu-dma-latency.
Currently there was only 1 cpu_dma_latency value which
we pass from DT for pm_qos due to which certain I/O use
cases have power/performance impact.
This patch adds support for dynamic Qos using clk scaling.
Using clk_scaling algo we dynamically decide which Qos value
to request for (i.e. Performance/Init/Power_save_mode).
Pass cpu-dma-latency table with 3 values from DT, which can
be used by sdhci layer to update pm_qos dynamically.
This patch also has backward compatibility with platforms that
does not support dynamic Qos and only pass 1 value from DT.
3 values in DT for following states of sdhci (for dynamic Qos)
1. SDHCI_PERFORMANCE_MODE -- least cpu_dma_latency
2. SDHCI_PERFORMANCE_MODE_INIT -- avg val
3. SDHCI_POWER_SAVE_MODE -- higher then avg.
may get updated with default val
based on sdhci_[enable/disable]
Change-Id: Ibce1681e9087c944a827bedb4bf406701b8ff959
Signed-off-by:
Ritesh Harjani <riteshh@codeaurora.org>
Loading
Please register or sign in to comment