linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] dmaengine/ARM: ti/am33xx: use proper 'dma-channels/requests' properties
@ 2022-05-03  6:51 Krzysztof Kozlowski
  2022-05-03  6:51 ` [PATCH v3 1/6] dt-bindings: usb: am33xx-usb: deprecate '#dma-channels' Krzysztof Kozlowski
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-03  6:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Benoît Cousson, Tony Lindgren, Sekhar Nori,
	Bartosz Golaszewski, Vinod Koul, linux-usb, devicetree,
	linux-kernel, linux-omap, linux-arm-kernel, dmaengine
  Cc: Krzysztof Kozlowski

Hi,

The core DT schema defines generic 'dma-channels' and 'dma-requests'
properties, so in preparation to moving bindings to DT schema, convert
existing users of '#dma-channels' and '#dma-requests' to the generic
variant.

Not tested on hardware.

The patchset is bisectable - please pick up through independent trees.

Changes since v2
================
1. Keep old properties, so the patchset is bisectable.
2. Add review tags.

Changes since v1
================
1. Add missing TI patches.

See also:
[1] https://lore.kernel.org/linux-devicetree/fedb56be-f275-aabb-cdf5-dbd394b8a7bd@linaro.org/T/#m6235f451045c337d70a62dc65eab9a716618550b

Best regards,
Krzysztof

Krzysztof Kozlowski (6):
  dt-bindings: usb: am33xx-usb: deprecate '#dma-channels'
  dt-bindings: usb: da8xx-usb: deprecate '#dma-channels'
  dmaengine: ti: deprecate '#dma-channels'
  ARM: dts: am33xx: use new 'dma-channels/requests' properties
  ARM: dts: da850: use new 'dma-channels' property
  ARM: dts: dm81xx: use new 'dma-channels/requests' properties

 Documentation/devicetree/bindings/usb/am33xx-usb.txt | 7 ++++---
 Documentation/devicetree/bindings/usb/da8xx-usb.txt  | 5 +++--
 arch/arm/boot/dts/am33xx.dtsi                        | 3 +++
 arch/arm/boot/dts/da850.dtsi                         | 2 ++
 arch/arm/boot/dts/dm814x.dtsi                        | 3 +++
 arch/arm/boot/dts/dm816x.dtsi                        | 3 +++
 drivers/dma/ti/cppi41.c                              | 6 +++++-
 7 files changed, 23 insertions(+), 6 deletions(-)

-- 
2.32.0


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

* [PATCH v3 1/6] dt-bindings: usb: am33xx-usb: deprecate '#dma-channels'
  2022-05-03  6:51 [PATCH v3 0/6] dmaengine/ARM: ti/am33xx: use proper 'dma-channels/requests' properties Krzysztof Kozlowski
@ 2022-05-03  6:51 ` Krzysztof Kozlowski
  2022-05-03  7:09   ` Tony Lindgren
  2022-05-03  6:51 ` [PATCH v3 2/6] dt-bindings: usb: da8xx-usb: " Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-03  6:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Benoît Cousson, Tony Lindgren, Sekhar Nori,
	Bartosz Golaszewski, Vinod Koul, linux-usb, devicetree,
	linux-kernel, linux-omap, linux-arm-kernel, dmaengine
  Cc: Krzysztof Kozlowski, Rob Herring

The generic property, used in most of the drivers and defined in generic
dma-common DT bindings, is 'dma-channels'.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/usb/am33xx-usb.txt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
index 7a198a30408a..654ffc62d013 100644
--- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt
+++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt
@@ -61,8 +61,9 @@ DMA
   endpoint number (0 … 14 for endpoints 1 … 15 on instance 0 and 15 … 29
   for endpoints 1 … 15 on instance 1). The second number is 0 for RX and
   1 for TX transfers.
-- #dma-channels: should be set to 30 representing the 15 endpoints for
+- dma-channels: should be set to 30 representing the 15 endpoints for
   each USB instance.
+- #dma-channels: deprecated
 
 Example:
 ~~~~~~~~
@@ -193,7 +194,7 @@ usb: usb@47400000 {
 		interrupts = <17>;
 		interrupt-names = "glue";
 		#dma-cells = <2>;
-		#dma-channels = <30>;
-		#dma-requests = <256>;
+		dma-channels = <30>;
+		dma-requests = <256>;
 	};
 };
-- 
2.32.0


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

* [PATCH v3 2/6] dt-bindings: usb: da8xx-usb: deprecate '#dma-channels'
  2022-05-03  6:51 [PATCH v3 0/6] dmaengine/ARM: ti/am33xx: use proper 'dma-channels/requests' properties Krzysztof Kozlowski
  2022-05-03  6:51 ` [PATCH v3 1/6] dt-bindings: usb: am33xx-usb: deprecate '#dma-channels' Krzysztof Kozlowski
@ 2022-05-03  6:51 ` Krzysztof Kozlowski
  2022-05-03  6:51 ` [PATCH v3 3/6] dmaengine: ti: " Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-03  6:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Benoît Cousson, Tony Lindgren, Sekhar Nori,
	Bartosz Golaszewski, Vinod Koul, linux-usb, devicetree,
	linux-kernel, linux-omap, linux-arm-kernel, dmaengine
  Cc: Krzysztof Kozlowski, Rob Herring

The generic property, used in most of the drivers and defined in generic
dma-common DT bindings, is 'dma-channels'.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/usb/da8xx-usb.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/da8xx-usb.txt b/Documentation/devicetree/bindings/usb/da8xx-usb.txt
index 9ce22551b2b3..fb2027a7d80d 100644
--- a/Documentation/devicetree/bindings/usb/da8xx-usb.txt
+++ b/Documentation/devicetree/bindings/usb/da8xx-usb.txt
@@ -36,7 +36,8 @@ DMA
 - #dma-cells: should be set to 2. The first number represents the
   channel number (0 … 3 for endpoints 1 … 4).
   The second number is 0 for RX and 1 for TX transfers.
-- #dma-channels: should be set to 4 representing the 4 endpoints.
+- dma-channels: should be set to 4 representing the 4 endpoints.
+- #dma-channels: deprecated
 
 Example:
 	usb_phy: usb-phy {
@@ -74,7 +75,7 @@ Example:
 			reg-names = "controller", "scheduler", "queuemgr";
 			interrupts = <58>;
 			#dma-cells = <2>;
-			#dma-channels = <4>;
+			dma-channels = <4>;
 		};
 
 	};
-- 
2.32.0


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

* [PATCH v3 3/6] dmaengine: ti: deprecate '#dma-channels'
  2022-05-03  6:51 [PATCH v3 0/6] dmaengine/ARM: ti/am33xx: use proper 'dma-channels/requests' properties Krzysztof Kozlowski
  2022-05-03  6:51 ` [PATCH v3 1/6] dt-bindings: usb: am33xx-usb: deprecate '#dma-channels' Krzysztof Kozlowski
  2022-05-03  6:51 ` [PATCH v3 2/6] dt-bindings: usb: da8xx-usb: " Krzysztof Kozlowski
@ 2022-05-03  6:51 ` Krzysztof Kozlowski
  2022-05-03  6:51 ` [PATCH v3 4/6] ARM: dts: am33xx: use new 'dma-channels/requests' properties Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-03  6:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Benoît Cousson, Tony Lindgren, Sekhar Nori,
	Bartosz Golaszewski, Vinod Koul, linux-usb, devicetree,
	linux-kernel, linux-omap, linux-arm-kernel, dmaengine
  Cc: Krzysztof Kozlowski

The generic property, used in most of the drivers and defined in generic
dma-common DT bindings, is 'dma-channels'.  Switch to new property while
keeping backward compatibility.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Tony Lindgren <tony@atomide.com>
---
 drivers/dma/ti/cppi41.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c
index 062bd9bd4de0..695915dba707 100644
--- a/drivers/dma/ti/cppi41.c
+++ b/drivers/dma/ti/cppi41.c
@@ -1105,8 +1105,12 @@ static int cppi41_dma_probe(struct platform_device *pdev)
 	cdd->qmgr_num_pend = glue_info->qmgr_num_pend;
 	cdd->first_completion_queue = glue_info->first_completion_queue;
 
+	/* Parse new and deprecated dma-channels properties */
 	ret = of_property_read_u32(dev->of_node,
-				   "#dma-channels", &cdd->n_chans);
+				   "dma-channels", &cdd->n_chans);
+	if (ret)
+		ret = of_property_read_u32(dev->of_node,
+					   "#dma-channels", &cdd->n_chans);
 	if (ret)
 		goto err_get_n_chans;
 
-- 
2.32.0


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

* [PATCH v3 4/6] ARM: dts: am33xx: use new 'dma-channels/requests' properties
  2022-05-03  6:51 [PATCH v3 0/6] dmaengine/ARM: ti/am33xx: use proper 'dma-channels/requests' properties Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2022-05-03  6:51 ` [PATCH v3 3/6] dmaengine: ti: " Krzysztof Kozlowski
@ 2022-05-03  6:51 ` Krzysztof Kozlowski
  2022-05-03  7:11   ` Tony Lindgren
  2022-05-03  6:52 ` [PATCH v3 5/6] ARM: dts: da850: use new 'dma-channels' property Krzysztof Kozlowski
  2022-05-03  6:52 ` [PATCH v3 6/6] ARM: dts: dm81xx: use new 'dma-channels/requests' properties Krzysztof Kozlowski
  5 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-03  6:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Benoît Cousson, Tony Lindgren, Sekhar Nori,
	Bartosz Golaszewski, Vinod Koul, linux-usb, devicetree,
	linux-kernel, linux-omap, linux-arm-kernel, dmaengine
  Cc: Krzysztof Kozlowski

The '#dma-channels' and '#dma-requests' properties were deprecated in
favor of these defined by generic dma-common DT bindings.  Add new
properties while keeping old ones for backwards compatibility.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm/boot/dts/am33xx.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index f6ec85d58dd1..9a8698bd2852 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -461,8 +461,11 @@ cppi41dma: dma-controller@2000 {
 				interrupts = <17>;
 				interrupt-names = "glue";
 				#dma-cells = <2>;
+				/* For backwards compatibility: */
 				#dma-channels = <30>;
+				dma-channels = <30>;
 				#dma-requests = <256>;
+				dma-requests = <256>;
 			};
 		};
 
-- 
2.32.0


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

* [PATCH v3 5/6] ARM: dts: da850: use new 'dma-channels' property
  2022-05-03  6:51 [PATCH v3 0/6] dmaengine/ARM: ti/am33xx: use proper 'dma-channels/requests' properties Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2022-05-03  6:51 ` [PATCH v3 4/6] ARM: dts: am33xx: use new 'dma-channels/requests' properties Krzysztof Kozlowski
@ 2022-05-03  6:52 ` Krzysztof Kozlowski
  2022-05-03  6:52 ` [PATCH v3 6/6] ARM: dts: dm81xx: use new 'dma-channels/requests' properties Krzysztof Kozlowski
  5 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-03  6:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Benoît Cousson, Tony Lindgren, Sekhar Nori,
	Bartosz Golaszewski, Vinod Koul, linux-usb, devicetree,
	linux-kernel, linux-omap, linux-arm-kernel, dmaengine
  Cc: Krzysztof Kozlowski

The '#dma-channels' property was deprecated in favor of one defined by
generic dma-common DT bindings.  Add new property while keeping old one
for backwards compatibility.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm/boot/dts/da850.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index c3942b4e82ad..0386376fa486 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -679,7 +679,9 @@ cppi41dma: dma-controller@201000 {
 					    "scheduler", "queuemgr";
 				interrupts = <58>;
 				#dma-cells = <2>;
+				/* For backwards compatibility: */
 				#dma-channels = <4>;
+				dma-channels = <4>;
 				power-domains = <&psc1 1>;
 				status = "okay";
 			};
-- 
2.32.0


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

* [PATCH v3 6/6] ARM: dts: dm81xx: use new 'dma-channels/requests' properties
  2022-05-03  6:51 [PATCH v3 0/6] dmaengine/ARM: ti/am33xx: use proper 'dma-channels/requests' properties Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2022-05-03  6:52 ` [PATCH v3 5/6] ARM: dts: da850: use new 'dma-channels' property Krzysztof Kozlowski
@ 2022-05-03  6:52 ` Krzysztof Kozlowski
  2022-05-03  7:11   ` Tony Lindgren
  5 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-03  6:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Benoît Cousson, Tony Lindgren, Sekhar Nori,
	Bartosz Golaszewski, Vinod Koul, linux-usb, devicetree,
	linux-kernel, linux-omap, linux-arm-kernel, dmaengine
  Cc: Krzysztof Kozlowski

The '#dma-channels' and '#dma-requests' properties were deprecated in
favor of these defined by generic dma-common DT bindings.  Add new
properties while keeping old ones for backwards compatibility.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm/boot/dts/dm814x.dtsi | 3 +++
 arch/arm/boot/dts/dm816x.dtsi | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/dm814x.dtsi b/arch/arm/boot/dts/dm814x.dtsi
index 7702e048e110..a92630113f57 100644
--- a/arch/arm/boot/dts/dm814x.dtsi
+++ b/arch/arm/boot/dts/dm814x.dtsi
@@ -167,8 +167,11 @@ cppi41dma: dma-controller@47402000 {
 				interrupts = <17>;
 				interrupt-names = "glue";
 				#dma-cells = <2>;
+				/* For backwards compatibility: */
 				#dma-channels = <30>;
+				dma-channels = <30>;
 				#dma-requests = <256>;
+				dma-requests = <256>;
 			};
 		};
 
diff --git a/arch/arm/boot/dts/dm816x.dtsi b/arch/arm/boot/dts/dm816x.dtsi
index a9e7274806f4..eb0a95da94b2 100644
--- a/arch/arm/boot/dts/dm816x.dtsi
+++ b/arch/arm/boot/dts/dm816x.dtsi
@@ -655,8 +655,11 @@ cppi41dma: dma-controller@47402000 {
 				interrupts = <17>;
 				interrupt-names = "glue";
 				#dma-cells = <2>;
+				/* For backwards compatibility: */
 				#dma-channels = <30>;
+				dma-channels = <30>;
 				#dma-requests = <256>;
+				dma-requests = <256>;
 			};
 		};
 
-- 
2.32.0


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

* Re: [PATCH v3 1/6] dt-bindings: usb: am33xx-usb: deprecate '#dma-channels'
  2022-05-03  6:51 ` [PATCH v3 1/6] dt-bindings: usb: am33xx-usb: deprecate '#dma-channels' Krzysztof Kozlowski
@ 2022-05-03  7:09   ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2022-05-03  7:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Benoît Cousson, Sekhar Nori, Bartosz Golaszewski,
	Vinod Koul, linux-usb, devicetree, linux-kernel, linux-omap,
	linux-arm-kernel, dmaengine, Rob Herring

* Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> [220503 06:48]:
> The generic property, used in most of the drivers and defined in generic
> dma-common DT bindings, is 'dma-channels'.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Rob Herring <robh@kernel.org>

Reviewed-by: Tony Lindgren <tony@atomide.com>

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

* Re: [PATCH v3 4/6] ARM: dts: am33xx: use new 'dma-channels/requests' properties
  2022-05-03  6:51 ` [PATCH v3 4/6] ARM: dts: am33xx: use new 'dma-channels/requests' properties Krzysztof Kozlowski
@ 2022-05-03  7:11   ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2022-05-03  7:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Benoît Cousson, Sekhar Nori, Bartosz Golaszewski,
	Vinod Koul, linux-usb, devicetree, linux-kernel, linux-omap,
	linux-arm-kernel, dmaengine

* Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> [220503 06:48]:
> The '#dma-channels' and '#dma-requests' properties were deprecated in
> favor of these defined by generic dma-common DT bindings.  Add new
> properties while keeping old ones for backwards compatibility.

I'm picking up this patch into omap-for-v5.19/dt thanks.

Regards,

Tony

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

* Re: [PATCH v3 6/6] ARM: dts: dm81xx: use new 'dma-channels/requests' properties
  2022-05-03  6:52 ` [PATCH v3 6/6] ARM: dts: dm81xx: use new 'dma-channels/requests' properties Krzysztof Kozlowski
@ 2022-05-03  7:11   ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2022-05-03  7:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Benoît Cousson, Sekhar Nori, Bartosz Golaszewski,
	Vinod Koul, linux-usb, devicetree, linux-kernel, linux-omap,
	linux-arm-kernel, dmaengine

* Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> [220503 06:48]:
> The '#dma-channels' and '#dma-requests' properties were deprecated in
> favor of these defined by generic dma-common DT bindings.  Add new
> properties while keeping old ones for backwards compatibility.

I'm picking up this patch into omap-for-v5.19/dt thanks.

Regards,

Tony

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

end of thread, other threads:[~2022-05-03  7:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03  6:51 [PATCH v3 0/6] dmaengine/ARM: ti/am33xx: use proper 'dma-channels/requests' properties Krzysztof Kozlowski
2022-05-03  6:51 ` [PATCH v3 1/6] dt-bindings: usb: am33xx-usb: deprecate '#dma-channels' Krzysztof Kozlowski
2022-05-03  7:09   ` Tony Lindgren
2022-05-03  6:51 ` [PATCH v3 2/6] dt-bindings: usb: da8xx-usb: " Krzysztof Kozlowski
2022-05-03  6:51 ` [PATCH v3 3/6] dmaengine: ti: " Krzysztof Kozlowski
2022-05-03  6:51 ` [PATCH v3 4/6] ARM: dts: am33xx: use new 'dma-channels/requests' properties Krzysztof Kozlowski
2022-05-03  7:11   ` Tony Lindgren
2022-05-03  6:52 ` [PATCH v3 5/6] ARM: dts: da850: use new 'dma-channels' property Krzysztof Kozlowski
2022-05-03  6:52 ` [PATCH v3 6/6] ARM: dts: dm81xx: use new 'dma-channels/requests' properties Krzysztof Kozlowski
2022-05-03  7:11   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).