summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@codeaurora.org>2017-06-20 14:37:43 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2017-10-06 14:40:45 +0530
commite3b357d95c51203ec6e5f8e41aa26aae921809d2 (patch)
tree75935ad9a3e1055ae2762f27f8367ecd71258ebf
parent427c374a0b8dfa2392aa3b0ad1c76ba5435f7194 (diff)
downloadlinux-e3b357d95c51203ec6e5f8e41aa26aae921809d2.tar.gz
remoteproc: qcom: q6v5: Vote for proxy powerdomain performance state
THIS IS TEST CODE, SHOULDN'T BE MERGED. This patch just demonstrates the usage of pm_genpd_update_performance_state() api in cases where users need to set performance state of a powerdomain without having to do it via the OPP framework. q6v5 remoteproc driver needs to proxy vote for performance states of multiple powerdomains (but we currently only demonstate how it can be done for one powerdomain, as there is no way to associate multiple powerdomains to a device at this time) while it loads the firmware, and then releases the vote, once the firmware is up and can vote for itself. This is not a functional patch since rpmpd driver only supports msm8996 and there is no msm8996 support in the q6v5 remoteproc driver at this point in mainline. This patch is not tested as well. NOT-signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> NOT-signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rw-r--r--drivers/remoteproc/qcom_q6v5_pil.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c
index 2d3d5ac..5a640276 100644
--- a/drivers/remoteproc/qcom_q6v5_pil.c
+++ b/drivers/remoteproc/qcom_q6v5_pil.c
@@ -18,6 +18,7 @@
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
+#include <linux/pm_domain.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
@@ -604,10 +605,9 @@ static int q6v5_start(struct rproc *rproc)
struct q6v5 *qproc = (struct q6v5 *)rproc->priv;
int ret;
- ret = q6v5_regulator_enable(qproc, qproc->proxy_regs,
- qproc->proxy_reg_count);
+ ret = dev_pm_genpd_set_performance_state(qproc->dev, 5);
if (ret) {
- dev_err(qproc->dev, "failed to enable proxy supplies\n");
+ dev_err(qproc->dev, "Failed to set performance state.\n");
return ret;
}
@@ -672,8 +672,7 @@ static int q6v5_start(struct rproc *rproc)
q6v5_clk_disable(qproc->dev, qproc->proxy_clks,
qproc->proxy_clk_count);
- q6v5_regulator_disable(qproc, qproc->proxy_regs,
- qproc->proxy_reg_count);
+ dev_pm_genpd_set_performance_state(qproc->dev, 0);
return 0;