Re: [PATCH 2/2] soc: qcom: apr: Make qcom,protection-domain optional again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 29, 2022 at 04:16:48PM +0100, Stephan Gerhold wrote:
> APR should not fail if the service device tree node does not have
> the qcom,protection-domain property, since this functionality does
> not exist on older platforms such as MSM8916 and MSM8996.
> 

Forgot that when I reviewed 6d7860f5750d, but you're right. Sorry about
that.

Reviewed-by: Bjorn Andersson <andersson@xxxxxxxxxx>

Regards,
Bjorn

> Ignore -EINVAL (returned when the property does not exist) to fix
> a regression on 6.2-rc1 that prevents audio from working:
> 
>   qcom,apr remoteproc0:smd-edge.apr_audio_svc.-1.-1:
>     Failed to read second value of qcom,protection-domain
>   qcom,apr remoteproc0:smd-edge.apr_audio_svc.-1.-1:
>     Failed to add apr 3 svc
> 
> Fixes: 6d7860f5750d ("soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index")
> Signed-off-by: Stephan Gerhold <stephan@xxxxxxxxxxx>
> ---
>  drivers/soc/qcom/apr.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c
> index cd44f17dad3d..d51abb462ae5 100644
> --- a/drivers/soc/qcom/apr.c
> +++ b/drivers/soc/qcom/apr.c
> @@ -461,9 +461,10 @@ static int apr_add_device(struct device *dev, struct device_node *np,
>  		goto out;
>  	}
>  
> +	/* Protection domain is optional, it does not exist on older platforms */
>  	ret = of_property_read_string_index(np, "qcom,protection-domain",
>  					    1, &adev->service_path);
> -	if (ret < 0) {
> +	if (ret < 0 && ret != -EINVAL) {
>  		dev_err(dev, "Failed to read second value of qcom,protection-domain\n");
>  		goto out;
>  	}
> -- 
> 2.39.0
> 



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux