All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: apr: Don't use reg for domain id
@ 2019-05-22  1:53 Bjorn Andersson
  2019-05-23 14:38 ` Srinivas Kandagatla
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Andersson @ 2019-05-22  1:53 UTC (permalink / raw)
  To: Andy Gross, Rob Herring, Mark Rutland
  Cc: linux-arm-msm, devicetree, linux-kernel, srinivas.kandagatla

The reg property represents the address and size on the bus that a
device lives, but for APR the parent is a rpmsg bus, which does not have
numerical addresses. Simply defining #address/#size-cells to 1 and 0,
respectively, to silence the compiler is not an appropriate solution.

Replace the use of "reg" with an APR specific property.

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

The APR device was recently added to msm8996.dtsi, but this is still
depending on working SMMU to provide functional audio support.

 Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt | 2 +-
 drivers/soc/qcom/apr.c                                  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
index bcc612cc7423..38d3c06abc41 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
@@ -9,7 +9,7 @@ used for audio/voice services on the QDSP.
 	Value type: <stringlist>
 	Definition: must be "qcom,apr-v<VERSION-NUMBER>", example "qcom,apr-v2"
 
-- reg
+- qcom,apr-domain
 	Usage: required
 	Value type: <u32>
 	Definition: Destination processor ID.
diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c
index 74f8b9607daa..b83d71b2e0a4 100644
--- a/drivers/soc/qcom/apr.c
+++ b/drivers/soc/qcom/apr.c
@@ -276,7 +276,7 @@ static int apr_probe(struct rpmsg_device *rpdev)
 	if (!apr)
 		return -ENOMEM;
 
-	ret = of_property_read_u32(dev->of_node, "reg", &apr->dest_domain_id);
+	ret = of_property_read_u32(dev->of_node, "qcom,apr-domain", &apr->dest_domain_id);
 	if (ret) {
 		dev_err(dev, "APR Domain ID not specified in DT\n");
 		return ret;
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] soc: qcom: apr: Don't use reg for domain id
  2019-05-22  1:53 [PATCH] soc: qcom: apr: Don't use reg for domain id Bjorn Andersson
@ 2019-05-23 14:38 ` Srinivas Kandagatla
  2019-05-23 14:45   ` Bjorn Andersson
  0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Kandagatla @ 2019-05-23 14:38 UTC (permalink / raw)
  To: Bjorn Andersson, Andy Gross, Rob Herring, Mark Rutland
  Cc: linux-arm-msm, devicetree, linux-kernel



On 22/05/2019 02:53, Bjorn Andersson wrote:
> The reg property represents the address and size on the bus that a
> device lives, but for APR the parent is a rpmsg bus, which does not have
> numerical addresses. Simply defining #address/#size-cells to 1 and 0,
> respectively, to silence the compiler is not an appropriate solution.
> 
I agree.

> Replace the use of "reg" with an APR specific property.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
Can you also change the example too.

other than that am okay with the change.

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

--srini
> 
> The APR device was recently added to msm8996.dtsi, but this is still
> depending on working SMMU to provide functional audio support.
> 
>   Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt | 2 +-
>   drivers/soc/qcom/apr.c                                  | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
> index bcc612cc7423..38d3c06abc41 100644
> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
> @@ -9,7 +9,7 @@ used for audio/voice services on the QDSP.
>   	Value type: <stringlist>
>   	Definition: must be "qcom,apr-v<VERSION-NUMBER>", example "qcom,apr-v2"
>   
> -- reg
> +- qcom,apr-domain
>   	Usage: required
>   	Value type: <u32>
>   	Definition: Destination processor ID.
> diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c
> index 74f8b9607daa..b83d71b2e0a4 100644
> --- a/drivers/soc/qcom/apr.c
> +++ b/drivers/soc/qcom/apr.c
> @@ -276,7 +276,7 @@ static int apr_probe(struct rpmsg_device *rpdev)
>   	if (!apr)
>   		return -ENOMEM;
>   
> -	ret = of_property_read_u32(dev->of_node, "reg", &apr->dest_domain_id);
> +	ret = of_property_read_u32(dev->of_node, "qcom,apr-domain", &apr->dest_domain_id);
>   	if (ret) {
>   		dev_err(dev, "APR Domain ID not specified in DT\n");
>   		return ret;
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] soc: qcom: apr: Don't use reg for domain id
  2019-05-23 14:38 ` Srinivas Kandagatla
@ 2019-05-23 14:45   ` Bjorn Andersson
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2019-05-23 14:45 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andy Gross, Rob Herring, Mark Rutland, linux-arm-msm, devicetree,
	linux-kernel

On Thu 23 May 07:38 PDT 2019, Srinivas Kandagatla wrote:

> 
> 
> On 22/05/2019 02:53, Bjorn Andersson wrote:
> > The reg property represents the address and size on the bus that a
> > device lives, but for APR the parent is a rpmsg bus, which does not have
> > numerical addresses. Simply defining #address/#size-cells to 1 and 0,
> > respectively, to silence the compiler is not an appropriate solution.
> > 
> I agree.
> 
> > Replace the use of "reg" with an APR specific property.
> > 
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > ---
> Can you also change the example too.
> 

Of course, sorry for missing that.

> other than that am okay with the change.
> 
> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> 

Thanks,
Bjorn

> --srini
> > 
> > The APR device was recently added to msm8996.dtsi, but this is still
> > depending on working SMMU to provide functional audio support.
> > 
> >   Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt | 2 +-
> >   drivers/soc/qcom/apr.c                                  | 2 +-
> >   2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
> > index bcc612cc7423..38d3c06abc41 100644
> > --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
> > +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
> > @@ -9,7 +9,7 @@ used for audio/voice services on the QDSP.
> >   	Value type: <stringlist>
> >   	Definition: must be "qcom,apr-v<VERSION-NUMBER>", example "qcom,apr-v2"
> > -- reg
> > +- qcom,apr-domain
> >   	Usage: required
> >   	Value type: <u32>
> >   	Definition: Destination processor ID.
> > diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c
> > index 74f8b9607daa..b83d71b2e0a4 100644
> > --- a/drivers/soc/qcom/apr.c
> > +++ b/drivers/soc/qcom/apr.c
> > @@ -276,7 +276,7 @@ static int apr_probe(struct rpmsg_device *rpdev)
> >   	if (!apr)
> >   		return -ENOMEM;
> > -	ret = of_property_read_u32(dev->of_node, "reg", &apr->dest_domain_id);
> > +	ret = of_property_read_u32(dev->of_node, "qcom,apr-domain", &apr->dest_domain_id);
> >   	if (ret) {
> >   		dev_err(dev, "APR Domain ID not specified in DT\n");
> >   		return ret;
> > 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-23 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22  1:53 [PATCH] soc: qcom: apr: Don't use reg for domain id Bjorn Andersson
2019-05-23 14:38 ` Srinivas Kandagatla
2019-05-23 14:45   ` Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.