linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sibis <sibis@codeaurora.org>
To: bjorn.andersson@linaro.org
Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, sibis@codeaurora.org,
	georgi.djakov@linaro.org, jassisinghbrar@gmail.com,
	p.zabel@pengutronix.de, ohad@wizery.com, mark.rutland@arm.com,
	robh+dt@kernel.org, kyan@codeaurora.org,
	sricharan@codeaurora.org, akdwived@codeaurora.org,
	linux-arm-msm@vger.kernel.org
Subject: [PATCH 6/6] remoteproc: qcom: Reorder active clks enable and reset
Date: Fri,  2 Mar 2018 14:53:39 +0530	[thread overview]
Message-ID: <1519982619-28336-7-git-send-email-sibis@codeaurora.org> (raw)
In-Reply-To: <1519982619-28336-1-git-send-email-sibis@codeaurora.org>

Active clks need to be enabled before Asserting/Deasserting
the reset lines in SDM845

Signed-off-by: sibis <sibis@codeaurora.org>
---
 drivers/remoteproc/qcom_q6v5_pil.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c
index f4997e0..cf45fe6 100644
--- a/drivers/remoteproc/qcom_q6v5_pil.c
+++ b/drivers/remoteproc/qcom_q6v5_pil.c
@@ -841,17 +841,18 @@ static int q6v5_start(struct rproc *rproc)
 		dev_err(qproc->dev, "failed to enable supplies\n");
 		goto disable_proxy_clk;
 	}
-	ret = qproc->ops->reset_start(qproc);
-	if (ret) {
-		dev_err(qproc->dev, "failed to deassert mss restart\n");
-		goto disable_vdd;
-	}
 
 	ret = q6v5_clk_enable(qproc->dev, qproc->active_clks,
 			      qproc->active_clk_count);
 	if (ret) {
 		dev_err(qproc->dev, "failed to enable clocks\n");
-		goto assert_reset;
+		goto disable_vdd;
+	}
+
+	ret = qproc->ops->reset_start(qproc);
+	if (ret) {
+		dev_err(qproc->dev, "failed to deassert mss restart\n");
+		goto disable_active_clks;
 	}
 
 	/* Assign MBA image access in DDR to q6 */
@@ -862,7 +863,7 @@ static int q6v5_start(struct rproc *rproc)
 		dev_err(qproc->dev,
 			"assigning Q6 access to mba memory failed: %d\n",
 			xfermemop_ret);
-		goto disable_active_clks;
+		goto assert_reset;
 	}
 
 	writel(qproc->mba_phys, qproc->rmb_base + RMB_MBA_IMAGE_REG);
@@ -931,12 +932,12 @@ static int q6v5_start(struct rproc *rproc)
 			"Failed to reclaim mba buffer, system may become unstable\n");
 	}
 
+assert_reset:
+	qproc->ops->reset_stop(qproc);
 disable_active_clks:
 	q6v5_clk_disable(qproc->dev, qproc->active_clks,
 			 qproc->active_clk_count);
 
-assert_reset:
-	qproc->ops->reset_stop(qproc);
 disable_vdd:
 	q6v5_regulator_disable(qproc, qproc->active_regs,
 			       qproc->active_reg_count);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

      parent reply	other threads:[~2018-03-02  9:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02  9:23 [PATCH 0/6] Add support for remoteproc modem-pil on SDM845 SoCs sibis
2018-03-02  9:23 ` [PATCH 1/6] reset: qcom: AOSS (Always on subsystem) reset controller sibis
2018-03-02 10:30   ` Philipp Zabel
2018-03-05  6:47     ` Sibi S
2018-03-02  9:23 ` [PATCH 2/6] dt-bindings: mailbox: Add APCS global binding for SDM845 SoCs sibis
2018-03-02  9:23 ` [PATCH 3/6] mailbox: Add support for Qualcomm " sibis
2018-03-02  9:23 ` [PATCH 4/6] dt-bindings: remoteproc: Add Q6v5 Modem PIL binding for SDM845 sibis
2018-03-02  9:23 ` [PATCH 5/6] remoteproc: qcom: Add support for mss remoteproc on SDM845 sibis
2018-03-02  9:23 ` sibis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519982619-28336-7-git-send-email-sibis@codeaurora.org \
    --to=sibis@codeaurora.org \
    --cc=akdwived@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=georgi.djakov@linaro.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=kyan@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ohad@wizery.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=sricharan@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).