diff mbox

[RFC,4/5] dt-bindings: soc/fsl: Update reserved memory binding for QBMan

Message ID 1490822037-6752-5-git-send-email-roy.pledge@nxp.com (mailing list archive)
State Superseded
Headers show

Commit Message

Roy Pledge March 29, 2017, 9:13 p.m. UTC
Updates the QMan and BMan device tree bindings for reserved memory
nodes. This makes the reserved memory allocation compatiable with
the shared-dma-pool usage.

Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
 Documentation/devicetree/bindings/soc/fsl/bman.txt | 10 +++++-----
 Documentation/devicetree/bindings/soc/fsl/qman.txt | 16 +++++++++-------
 2 files changed, 14 insertions(+), 12 deletions(-)

Comments

Rob Herring (Arm) April 3, 2017, 3:42 p.m. UTC | #1
On Wed, Mar 29, 2017 at 05:13:56PM -0400, Roy Pledge wrote:
> Updates the QMan and BMan device tree bindings for reserved memory
> nodes. This makes the reserved memory allocation compatiable with

s/compatiable/compatible/

> the shared-dma-pool usage.

This change is not backwards compatible. Please state that and explain 
why that is okay. If PPC needs to not change, then the old strings and 
properties should remain, but deprecated.

> 
> Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
> ---
>  Documentation/devicetree/bindings/soc/fsl/bman.txt | 10 +++++-----
>  Documentation/devicetree/bindings/soc/fsl/qman.txt | 16 +++++++++-------
>  2 files changed, 14 insertions(+), 12 deletions(-)
Roy Pledge April 3, 2017, 7:49 p.m. UTC | #2
On 4/3/2017 11:42 AM, Rob Herring wrote:
> On Wed, Mar 29, 2017 at 05:13:56PM -0400, Roy Pledge wrote:
>> Updates the QMan and BMan device tree bindings for reserved memory
>> nodes. This makes the reserved memory allocation compatiable with
> s/compatiable/compatible/
>
>> the shared-dma-pool usage.
> This change is not backwards compatible. Please state that and explain 
> why that is okay. If PPC needs to not change, then the old strings and 
> properties should remain, but deprecated.
I think I can make the old device trees compatible since the
"compatible" string changed without too much effort or ifdefery in the
code.  However I would like to eventually see all PPC users move to the
new mode as I do believe it is more in alignment with the spirit of the
reserved-memory framework that is in the kernel.  Do I need to mention
the old mode in the binding.txt file?  I'm trying to keep things clean
so someone reading the binding doesn't get a headache and trying to
preserve my own sanity as we move forward with adding new features to
this driver.

Roy
Crystal Wood April 4, 2017, 12:32 a.m. UTC | #3
On Mon, 2017-04-03 at 19:49 +0000, Roy Pledge wrote:
> On 4/3/2017 11:42 AM, Rob Herring wrote:
> > 
> > On Wed, Mar 29, 2017 at 05:13:56PM -0400, Roy Pledge wrote:
> > > 
> > > Updates the QMan and BMan device tree bindings for reserved memory
> > > nodes. This makes the reserved memory allocation compatiable with
> > s/compatiable/compatible/
> > 
> > > 
> > > the shared-dma-pool usage.
> > This change is not backwards compatible. Please state that and explain 
> > why that is okay. If PPC needs to not change, then the old strings and 
> > properties should remain, but deprecated.
> I think I can make the old device trees compatible since the
> "compatible" string changed without too much effort or ifdefery in the
> code.  However I would like to eventually see all PPC users move to the
> new mode as I do believe it is more in alignment with the spirit of the
> reserved-memory framework that is in the kernel.

How much benefit is there to changing PPC if you have to retain the old method
anyway for compatibility?  Whereas if you don't convert, you retain test
coverage for the old device trees, and don't have to worry about
the memblock_end_of_DRAM() questions.

>   Do I need to mention the old mode in the binding.txt file? 

Yes.

>  I'm trying to keep things clean
> so someone reading the binding doesn't get a headache and trying to
> preserve my own sanity as we move forward with adding new features to
> this driver.

If they're sufficiently different then just describe the new and old nodes
separately rather than putting a bunch of if/else clauses in there.

-Scott
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/soc/fsl/bman.txt b/Documentation/devicetree/bindings/soc/fsl/bman.txt
index 47ac834..bdf2fae7 100644
--- a/Documentation/devicetree/bindings/soc/fsl/bman.txt
+++ b/Documentation/devicetree/bindings/soc/fsl/bman.txt
@@ -65,8 +65,8 @@  to the respective BMan instance
 BMan Private Memory Node
 
 BMan requires a contiguous range of physical memory used for the backing store
-for BMan Free Buffer Proxy Records (FBPR). This memory is reserved/allocated as a
-node under the /reserved-memory node
+for BMan Free Buffer Proxy Records (FBPR). This memory is reserved/allocated as
+a node under the /reserved-memory node.
 
 The BMan FBPR memory node must be named "bman-fbpr"
 
@@ -75,7 +75,7 @@  PROPERTIES
 - compatible
 	Usage:		required
 	Value type:	<stringlist>
-	Definition:	Must inclide "fsl,bman-fbpr"
+	Definition:	Must include "shared-mem-pool"
 
 The following constraints are relevant to the FBPR private memory:
 	- The size must be 2^(size + 1), with size = 11..33. That is 4 KiB to
@@ -100,10 +100,10 @@  The example below shows a BMan FBPR dynamic allocation memory node
 		ranges;
 
 		bman_fbpr: bman-fbpr {
-			compatible = "fsl,bman-fbpr";
-			alloc-ranges = <0 0 0x10 0>;
+			compatible = "shared-mem-pool";
 			size = <0 0x1000000>;
 			alignment = <0 0x1000000>;
+			no-map;
 		};
 	};
 
diff --git a/Documentation/devicetree/bindings/soc/fsl/qman.txt b/Documentation/devicetree/bindings/soc/fsl/qman.txt
index 556ebb8..3e7d863 100644
--- a/Documentation/devicetree/bindings/soc/fsl/qman.txt
+++ b/Documentation/devicetree/bindings/soc/fsl/qman.txt
@@ -74,7 +74,9 @@  QMan Private Memory Nodes
 
 QMan requires two contiguous range of physical memory used for the backing store
 for QMan Frame Queue Descriptor (FQD) and Packed Frame Descriptor Record (PFDR).
-This memory is reserved/allocated as a nodes under the /reserved-memory node
+This memory is reserved/allocated as a node under the /reserved-memory node.
+
+For additional details about reserved memory regions see reserved-memory.txt
 
 The QMan FQD memory node must be named "qman-fqd"
 
@@ -83,7 +85,7 @@  PROPERTIES
 - compatible
 	Usage:		required
 	Value type:	<stringlist>
-	Definition:	Must inclide "fsl,qman-fqd"
+	Definition:	Must include "shared-dma-pool"
 
 The QMan PFDR memory node must be named "qman-pfdr"
 
@@ -92,7 +94,7 @@  PROPERTIES
 - compatible
 	Usage:		required
 	Value type:	<stringlist>
-	Definition:	Must inclide "fsl,qman-pfdr"
+	Definition:	Must include "shared-dma-pool"
 
 The following constraints are relevant to the FQD and PFDR private memory:
 	- The size must be 2^(size + 1), with size = 11..29. That is 4 KiB to
@@ -117,16 +119,16 @@  The example below shows a QMan FQD and a PFDR dynamic allocation memory nodes
 		ranges;
 
 		qman_fqd: qman-fqd {
-			compatible = "fsl,qman-fqd";
-			alloc-ranges = <0 0 0x10 0>;
+			compatible = "shared-dma-pool";
 			size = <0 0x400000>;
 			alignment = <0 0x400000>;
+			no-map;
 		};
 		qman_pfdr: qman-pfdr {
-			compatible = "fsl,qman-pfdr";
-			alloc-ranges = <0 0 0x10 0>;
+			compatible = "shared-dma-pool";
 			size = <0 0x2000000>;
 			alignment = <0 0x2000000>;
+			no-map;
 		};
 	};