LKML Archive on
 help / color / Atom feed
From: Bjorn Andersson <>
To: Russell King <>,
	Greg Kroah-Hartman <>,
	Ulf Hansson <>
	Sai Prakash Ranjan <>
Subject: [RESEND PATCH] amba: Allow pclk to be controlled by power domain
Date: Wed, 30 Jan 2019 18:01:41 -0800
Message-ID: <> (raw)

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 <>

Resending this separate from the series it was originally part of.

 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)

             reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31  2:01 Bjorn Andersson [this message]
2019-01-31 10:32 ` Sai Prakash Ranjan
2019-02-05 14:58 ` Ulf Hansson
2019-02-19  6:43   ` Bjorn Andersson
2019-02-21  7:55     ` Ulf Hansson

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:

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

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone