Re: [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM

2015-07-23 Thread Andy Gross
On Fri, Jun 26, 2015 at 02:50:09PM -0700, bj...@kryo.se wrote:
> From: Bjorn Andersson 
> 
> Add device tree binding documentation for the Qualcom Shared Memory
> Manager.
> 
> Signed-off-by: Bjorn Andersson 



> + smem@fa0 {
> + compatible = "qcom,smem";
> +
> + memory-region = <&smem_region>;
> + reg = <0xfc428000 0x4000>;

I'll fixup the address here before applying.

Applied, thanks!

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM

2015-07-13 Thread Bjorn Andersson
On Wed 08 Jul 16:56 PDT 2015, Stephen Boyd wrote:

> On 06/26/2015 02:50 PM, bj...@kryo.se wrote:
> > += EXAMPLE
> > +The following example shows the SMEM setup for MSM8974, with a main SMEM 
> > region
> > +at 0xfa0 and an auxiliary region at 0xfc428000:
> > +
> > +   reserved-memory {
> > +   #address-cells = <1>;
> > +   #size-cells = <1>;
> > +   ranges;
> > +
> > +   smem_region: smem@fa0 {
> > +   reg = <0xfa0 0x20>;
> > +   no-map;
> > +   };
> > +   };
> > +
> > +   smem@fa0 {
> 
> This should be smem@fc428000 matching the first reg property. It's weird
> though, because if smem is using a secondary region it will be under the
> SoC node and have a reg property. Otherwise it would be directly under
> the root node and only have a memory-region. It would be nice if we
> could somehow move the rpm message ram (0xfc428000) into the
> reserved-memory node so that we could use memory-region for both regions.
> 

I agree, the semantics here became a little bit odd.

I do not think we should list the 0xfc428000 region as a memory-region,
as it's "device memory" and I do like the fact that we don't repeat
ourselves with listing the memory-region as a reg.

Therefor I think this is the least ugly option, but the address in the
name of the node should be updated.

> > +   compatible = "qcom,smem";
> > +
> > +   memory-region = <&smem_region>;
> > +   reg = <0xfc428000 0x4000>;
> > +
> > +   hwlocks = <&tcsr_mutex 3>;
> > +   };
> 

Thanks,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM

2015-07-08 Thread Andy Gross
On Wed, Jul 08, 2015 at 04:56:34PM -0700, Stephen Boyd wrote:
> On 06/26/2015 02:50 PM, bj...@kryo.se wrote:
> > += EXAMPLE
> > +The following example shows the SMEM setup for MSM8974, with a main SMEM 
> > region
> > +at 0xfa0 and an auxiliary region at 0xfc428000:
> > +
> > +   reserved-memory {
> > +   #address-cells = <1>;
> > +   #size-cells = <1>;
> > +   ranges;
> > +
> > +   smem_region: smem@fa0 {
> > +   reg = <0xfa0 0x20>;
> > +   no-map;
> > +   };
> > +   };
> > +
> > +   smem@fa0 {
> 
> This should be smem@fc428000 matching the first reg property. It's weird
> though, because if smem is using a secondary region it will be under the
> SoC node and have a reg property. Otherwise it would be directly under
> the root node and only have a memory-region. It would be nice if we
> could somehow move the rpm message ram (0xfc428000) into the
> reserved-memory node so that we could use memory-region for both regions.

The memory-region is just used to describe 'real' memory.  The RPM message is IO
memory and part of the SOC.  Thats my take at least.

> 
> > +   compatible = "qcom,smem";
> > +
> > +   memory-region = <&smem_region>;
> > +   reg = <0xfc428000 0x4000>;
> > +
> > +   hwlocks = <&tcsr_mutex 3>;
> > +   };

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM

2015-07-08 Thread Stephen Boyd
On 06/26/2015 02:50 PM, bj...@kryo.se wrote:
> += EXAMPLE
> +The following example shows the SMEM setup for MSM8974, with a main SMEM 
> region
> +at 0xfa0 and an auxiliary region at 0xfc428000:
> +
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + smem_region: smem@fa0 {
> + reg = <0xfa0 0x20>;
> + no-map;
> + };
> + };
> +
> + smem@fa0 {

This should be smem@fc428000 matching the first reg property. It's weird
though, because if smem is using a secondary region it will be under the
SoC node and have a reg property. Otherwise it would be directly under
the root node and only have a memory-region. It would be nice if we
could somehow move the rpm message ram (0xfc428000) into the
reserved-memory node so that we could use memory-region for both regions.

> + compatible = "qcom,smem";
> +
> + memory-region = <&smem_region>;
> + reg = <0xfc428000 0x4000>;
> +
> + hwlocks = <&tcsr_mutex 3>;
> + };


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 01/11] soc: qcom: Add device tree binding for SMEM

2015-06-26 Thread bjorn
From: Bjorn Andersson 

Add device tree binding documentation for the Qualcom Shared Memory
Manager.

Signed-off-by: Bjorn Andersson 
---
 .../devicetree/bindings/soc/qcom/qcom,smem.txt | 51 ++
 1 file changed, 51 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt 
b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
new file mode 100644
index 000..19cad6c
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
@@ -0,0 +1,51 @@
+Qualcomm Shared Memory Manager binding
+
+This binding describes the Qualcomm Shared Memory Manager, used to share data
+between various subsystems and OSes in Qualcomm platforms.
+
+- compatible:
+   Usage: required
+   Value type: 
+   Definition: must be:
+   "qcom,smem"
+
+- memory-region:
+   Usage: required
+   Value type: 
+   Definition: handle to memory reservation for main SMEM memory region.
+
+- reg:
+   Usage: optional
+   Value type: 
+   Definition: base address and size pair for any additional memory areas
+   of the shared memory.
+
+- hwlocks:
+   Usage: required
+   Value type: 
+   Definition: reference to a hwspinlock used to protect allocations from
+   the shared memory
+
+= EXAMPLE
+The following example shows the SMEM setup for MSM8974, with a main SMEM region
+at 0xfa0 and an auxiliary region at 0xfc428000:
+
+   reserved-memory {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+
+   smem_region: smem@fa0 {
+   reg = <0xfa0 0x20>;
+   no-map;
+   };
+   };
+
+   smem@fa0 {
+   compatible = "qcom,smem";
+
+   memory-region = <&smem_region>;
+   reg = <0xfc428000 0x4000>;
+
+   hwlocks = <&tcsr_mutex 3>;
+   };
-- 
1.9.3 (Apple Git-50)

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html