soc: qcom: apr: Don't use reg for domain id
Subsystems (4)
PATCH 1/1 soc: qcom: apr: Don't use reg for domain id
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.
---
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(-)
Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt +1 -1
@@ -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.
drivers/soc/qcom/apr.c +1 -1
@@ -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;
Signature · 1 line
2.18.0
Quoted 5 lines · Bjorn Andersson
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.
Quoted 4 lines
Replace the use of "reg" with an APR specific property.
Signed-off-by Bjorn Andersson <[email protected]>---
Can you also change the example too.
other than that am okay with the change.
--srini
Quoted 35 lines
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(-)Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt +1
-1@@ -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.drivers/soc/qcom/apr.c +1
-1@@ -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;
Quoted 8 lines · Srinivas Kandagatla
Quoted 5 lines · Bjorn Andersson
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.
Quoted 8 lines
I agree.
Quoted 4 lines
Replace the use of "reg" with an APR specific property.
Signed-off-by Bjorn Andersson <[email protected]>---
Can you also change the example too.
Of course, sorry for missing that.
Quoted 4 lines
other than that am okay with the change.
Reviewed-by Srinivas Kandagatla <[email protected]>
Thanks,
Bjorn
Quoted 34 lines
--srini
Quoted 33 lines
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(-)Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt +1
-1@@ -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.drivers/soc/qcom/apr.c +1
-1@@ -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;