lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7ab660d-d127-b654-ade7-c8149b656610@codeaurora.org>
Date:   Thu, 31 Jan 2019 16:02:59 +0530
From:   Sai Prakash Ranjan <saiprakash.ranjan@...eaurora.org>
To:     Bjorn Andersson <bjorn.andersson@...aro.org>,
        Russell King <linux@...linux.org.uk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Ulf Hansson <ulf.hansson@...aro.org>
Cc:     linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [RESEND PATCH] amba: Allow pclk to be controlled by power domain

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@...aro.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@...eaurora.org>

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ