linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Russell King <linux@armlinux.org.uk>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>,
	David Brown <david.brown@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Arun Kumar Neelakantam <aneela@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 6/7] amba: Allow pclk to be controlled by power domain
Date: Sun,  6 Jan 2019 00:09:14 -0800	[thread overview]
Message-ID: <20190106080915.4493-7-bjorn.andersson@linaro.org> (raw)
In-Reply-To: <20190106080915.4493-1-bjorn.andersson@linaro.org>

On the Qualcomm SDM845 platform the apb_pclk is controlled as part of
the QDSS power/clock domain. Handle this by allowing amba to operate
without direct apb_pclk control, when a powerdomain is attached and no
clock is described.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Changes since v1:
- New patch

 drivers/amba/bus.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 41b706403ef7..3e13050c6d59 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -219,8 +219,13 @@ static int amba_get_enable_pclk(struct amba_device *pcdev)
 	int ret;
 
 	pcdev->pclk = clk_get(&pcdev->dev, "apb_pclk");
-	if (IS_ERR(pcdev->pclk))
-		return PTR_ERR(pcdev->pclk);
+	if (IS_ERR(pcdev->pclk)) {
+		/* Continue with no clock specified, but pm_domain attached */
+		if (PTR_ERR(pcdev->pclk) == -ENOENT && pcdev->dev.pm_domain)
+			pcdev->pclk = NULL;
+		else
+			return PTR_ERR(pcdev->pclk);
+	}
 
 	ret = clk_prepare_enable(pcdev->pclk);
 	if (ret)
-- 
2.18.0


  parent reply	other threads:[~2019-01-06  8:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-06  8:09 [PATCH v2 0/7] Qualcomm AOSS QMP side channel binding and driver Bjorn Andersson
2019-01-06  8:09 ` [PATCH v2 1/7] dt-bindings: soc: qcom: Add AOSS QMP binding Bjorn Andersson
2019-01-11 22:10   ` Rob Herring
2019-01-14 22:30   ` Stephen Boyd
2019-01-06  8:09 ` [PATCH v2 2/7] soc: qcom: Add AOSS QMP communication driver Bjorn Andersson
2019-01-10 12:48   ` Arun Kumar Neelakantam
2019-01-14 22:36   ` Stephen Boyd
2019-01-14 23:20     ` Bjorn Andersson
2019-01-06  8:09 ` [PATCH v2 3/7] soc: qcom: Add AOSS QMP genpd provider Bjorn Andersson
2019-01-10  4:59   ` Sai Prakash Ranjan
2019-01-14 22:40   ` Stephen Boyd
2019-01-14 23:29     ` Bjorn Andersson
2019-01-06  8:09 ` [PATCH v2 4/7] remoteproc: q6v5-mss: Vote for rpmh power domains Bjorn Andersson
2019-01-09 14:39   ` Sibi Sankar
2019-01-06  8:09 ` [PATCH v2 5/7] remoteproc: q6v5-mss: Active powerdomain for SDM845 Bjorn Andersson
2019-01-09 14:40   ` Sibi Sankar
2019-01-06  8:09 ` Bjorn Andersson [this message]
2019-01-06  8:09 ` [(RFC) PATCH v2 7/7] soc: qcom: aoss-qmp: Add cooling device support Bjorn Andersson
2019-01-11 22:11   ` Rob Herring

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=20190106080915.4493-7-bjorn.andersson@linaro.org \
    --to=bjorn.andersson@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=aneela@codeaurora.org \
    --cc=david.brown@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.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).