diff options
author | Sibi Sankar <sibis@codeaurora.org> | 2018-05-21 22:57:12 +0530 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-05-29 20:10:34 -0700 |
commit | 9f135fa1ffea3005f0d8021e55463134a2175928 (patch) | |
tree | f9831cea3cebfcfe642710c6d48e00aa6d5db949 /drivers/remoteproc/qcom_q6v5_pil.c | |
parent | fb22022ff63ddbc51face6fb2f06496ae90d3293 (diff) | |
download | blackbird-op-linux-9f135fa1ffea3005f0d8021e55463134a2175928.tar.gz blackbird-op-linux-9f135fa1ffea3005f0d8021e55463134a2175928.zip |
remoteproc: q6v5: Introduce reset assert/deassert helper functions
Adding reset assert/deassert helper functions to handle SoC
specific reset sequences. This wil be used by SDM845 to assert and
deassert ALT_RESET and MSS_RESET signals.
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/qcom_q6v5_pil.c')
-rw-r--r-- | drivers/remoteproc/qcom_q6v5_pil.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c index a7c325ef78a1..7e2691c9c034 100644 --- a/drivers/remoteproc/qcom_q6v5_pil.c +++ b/drivers/remoteproc/qcom_q6v5_pil.c @@ -337,6 +337,16 @@ static int q6v5_load(struct rproc *rproc, const struct firmware *fw) return 0; } +static int q6v5_reset_assert(struct q6v5 *qproc) +{ + return reset_control_assert(qproc->mss_restart); +} + +static int q6v5_reset_deassert(struct q6v5 *qproc) +{ + return reset_control_deassert(qproc->mss_restart); +} + static int q6v5_rmb_pbl_wait(struct q6v5 *qproc, int ms) { unsigned long timeout; @@ -755,7 +765,7 @@ static int q6v5_start(struct rproc *rproc) dev_err(qproc->dev, "failed to enable supplies\n"); goto disable_proxy_clk; } - ret = reset_control_deassert(qproc->mss_restart); + ret = q6v5_reset_deassert(qproc); if (ret) { dev_err(qproc->dev, "failed to deassert mss restart\n"); goto disable_vdd; @@ -843,7 +853,7 @@ disable_active_clks: qproc->active_clk_count); assert_reset: - reset_control_assert(qproc->mss_restart); + q6v5_reset_assert(qproc); disable_vdd: q6v5_regulator_disable(qproc, qproc->active_regs, qproc->active_reg_count); @@ -896,7 +906,7 @@ static int q6v5_stop(struct rproc *rproc) qproc->mpss_phys, qproc->mpss_size); WARN_ON(ret); - reset_control_assert(qproc->mss_restart); + q6v5_reset_assert(qproc); disable_irq(qproc->handover_irq); |