From: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
Russell King <linux@armlinux.org.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [RESEND PATCH] amba: Allow pclk to be controlled by power domain
Date: Thu, 31 Jan 2019 16:02:59 +0530 [thread overview]
Message-ID: <e7ab660d-d127-b654-ade7-c8149b656610@codeaurora.org> (raw)
In-Reply-To: <20190131020141.28352-1-bjorn.andersson@linaro.org>
On 1/31/2019 7:31 AM, Bjorn Andersson wrote:
> 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>
> ---
>
> 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)
>
Thanks.
Tested-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2019-01-31 10:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 2:01 [RESEND PATCH] amba: Allow pclk to be controlled by power domain Bjorn Andersson
2019-01-31 10:32 ` Sai Prakash Ranjan [this message]
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:
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=e7ab660d-d127-b654-ade7-c8149b656610@codeaurora.org \
--to=saiprakash.ranjan@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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).