soc: qcom: apr: Don't use reg for domain id
authorBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 23 May 2019 15:01:53 +0000 (08:01 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sat, 15 Jun 2019 07:03:44 +0000 (00:03 -0700)
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.

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt
drivers/soc/qcom/apr.c

index bcc612cc74232235e553072fddd7169e08f7794e..db501269f47b84cdebb6af7eff987d529727eb05 100644 (file)
@@ -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.
@@ -49,9 +49,9 @@ by the individual bindings for the specific service
 The following example represents a QDSP based sound card on a MSM8996 device
 which uses apr as communication between Apps and QDSP.
 
-       apr@4 {
+       apr {
                compatible = "qcom,apr-v2";
-               reg = <APR_DOMAIN_ADSP>;
+               qcom,apr-domain = <APR_DOMAIN_ADSP>;
 
                q6core@3 {
                        compatible = "qcom,q6core";
index 039e3aa6f5e0b42dd3c245ae9ed2bcb9c440d527..4fcc32420c4740d3988339f83dcf923db4cfb709 100644 (file)
@@ -328,7 +328,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;