dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: dmaengine: Remove SHDMA Device Tree bindings
       [not found] <cover.1623406640.git.geert+renesas@glider.be>
@ 2021-06-11 10:18 ` Geert Uytterhoeven
  2021-06-16 17:56   ` Rob Herring
  2021-06-11 10:18 ` [PATCH 2/3] dmaengine: sh: Remove unused shdma-of driver Geert Uytterhoeven
  2021-06-11 10:18 ` [PATCH 3/3] ARM: dts: r8a73a4: Remove non-functional DMA support Geert Uytterhoeven
  2 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2021-06-11 10:18 UTC (permalink / raw)
  To: Rob Herring, Vinod Koul, Magnus Damm
  Cc: Guennadi Liakhovetski, Laurent Pinchart, devicetree, dmaengine,
	linux-renesas-soc, linux-sh, linux-arm-kernel,
	Geert Uytterhoeven

Remove the Renesas SHDMA Device Tree bindings, as they are unused.
The DMA multiplexer node and one DMA controller instance were added to
the R-Mobile APE6 .dtsi file, but DMA support was never fully enabled,
cfr. commit a19788612f51b787 ("dmaengine: sh: Remove R-Mobile APE6
support").

Note that the mux idea was dropped when implementing support for DMA on
R-Car Gen2, cfr. renesas,rcar-dmac.yaml.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 .../devicetree/bindings/dma/renesas,shdma.txt | 84 -------------------
 1 file changed, 84 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/dma/renesas,shdma.txt

diff --git a/Documentation/devicetree/bindings/dma/renesas,shdma.txt b/Documentation/devicetree/bindings/dma/renesas,shdma.txt
deleted file mode 100644
index a91920a49433c2b8..0000000000000000
--- a/Documentation/devicetree/bindings/dma/renesas,shdma.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-* SHDMA Device Tree bindings
-
-Sh-/r-mobile and R-Car systems often have multiple identical DMA controller
-instances, capable of serving any of a common set of DMA slave devices, using
-the same configuration. To describe this topology we require all compatible
-SHDMA DT nodes to be placed under a DMA multiplexer node. All such compatible
-DMAC instances have the same number of channels and use the same DMA
-descriptors. Therefore respective DMA DT bindings can also all be placed in the
-multiplexer node. Even if there is only one such DMAC instance on a system, it
-still has to be placed under such a multiplexer node.
-
-* DMA multiplexer
-
-Required properties:
-- compatible:	should be "renesas,shdma-mux"
-- #dma-cells:	should be <1>, see "dmas" property below
-
-Optional properties (currently unused):
-- dma-channels:	number of DMA channels
-- dma-requests:	number of DMA request signals
-
-* DMA controller
-
-Required properties:
-- compatible:	should be of the form "renesas,shdma-<soc>", where <soc> should
-		be replaced with the desired SoC model, e.g.
-		"renesas,shdma-r8a73a4" for the system DMAC on r8a73a4 SoC
-
-Example:
-	dmac: dma-multiplexer@0 {
-		compatible = "renesas,shdma-mux";
-		#dma-cells = <1>;
-		dma-channels = <20>;
-		dma-requests = <256>;
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-
-		dma0: dma-controller@e6700020 {
-			compatible = "renesas,shdma-r8a73a4";
-			reg = <0 0xe6700020 0 0x89e0>;
-			interrupt-parent = <&gic>;
-			interrupts = <0 220 4
-					0 200 4
-					0 201 4
-					0 202 4
-					0 203 4
-					0 204 4
-					0 205 4
-					0 206 4
-					0 207 4
-					0 208 4
-					0 209 4
-					0 210 4
-					0 211 4
-					0 212 4
-					0 213 4
-					0 214 4
-					0 215 4
-					0 216 4
-					0 217 4
-					0 218 4
-					0 219 4>;
-			interrupt-names = "error",
-					"ch0", "ch1", "ch2", "ch3",
-					"ch4", "ch5", "ch6", "ch7",
-					"ch8", "ch9", "ch10", "ch11",
-					"ch12", "ch13", "ch14", "ch15",
-					"ch16", "ch17", "ch18", "ch19";
-		};
-	};
-
-* DMA client
-
-Required properties:
-- dmas:		a list of <[DMA multiplexer phandle] [MID/RID value]> pairs,
-		where MID/RID values are fixed handles, specified in the SoC
-		manual
-- dma-names:	a list of DMA channel names, one per "dmas" entry
-
-Example:
-	dmas = <&dmac 0xd1
-		&dmac 0xd2>;
-	dma-names = "tx", "rx";
-- 
2.25.1


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

* [PATCH 2/3] dmaengine: sh: Remove unused shdma-of driver
       [not found] <cover.1623406640.git.geert+renesas@glider.be>
  2021-06-11 10:18 ` [PATCH 1/3] dt-bindings: dmaengine: Remove SHDMA Device Tree bindings Geert Uytterhoeven
@ 2021-06-11 10:18 ` Geert Uytterhoeven
  2021-06-11 10:18 ` [PATCH 3/3] ARM: dts: r8a73a4: Remove non-functional DMA support Geert Uytterhoeven
  2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2021-06-11 10:18 UTC (permalink / raw)
  To: Rob Herring, Vinod Koul, Magnus Damm
  Cc: Guennadi Liakhovetski, Laurent Pinchart, devicetree, dmaengine,
	linux-renesas-soc, linux-sh, linux-arm-kernel,
	Geert Uytterhoeven

Remove the DT-based Renesas SHDMA DMA multiplexer driver, as it is
unused.  The DMA multiplexer node and one DMA controller instance were
added to the R-Mobile APE6 .dtsi file, but DMA support was never fully
enabled, cfr. commit a19788612f51b787 ("dmaengine: sh: Remove R-Mobile
APE6 support").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/dma/sh/Makefile   |  2 +-
 drivers/dma/sh/shdma-of.c | 76 ---------------------------------------
 2 files changed, 1 insertion(+), 77 deletions(-)
 delete mode 100644 drivers/dma/sh/shdma-of.c

diff --git a/drivers/dma/sh/Makefile b/drivers/dma/sh/Makefile
index 112fbd22bb3fb984..abdf10341725c36b 100644
--- a/drivers/dma/sh/Makefile
+++ b/drivers/dma/sh/Makefile
@@ -3,7 +3,7 @@
 # DMA Engine Helpers
 #
 
-obj-$(CONFIG_SH_DMAE_BASE) += shdma-base.o shdma-of.o
+obj-$(CONFIG_SH_DMAE_BASE) += shdma-base.o
 
 #
 # DMA Controllers
diff --git a/drivers/dma/sh/shdma-of.c b/drivers/dma/sh/shdma-of.c
deleted file mode 100644
index be89dd894328f589..0000000000000000
--- a/drivers/dma/sh/shdma-of.c
+++ /dev/null
@@ -1,76 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * SHDMA Device Tree glue
- *
- * Copyright (C) 2013 Renesas Electronics Inc.
- * Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
- */
-
-#include <linux/dmaengine.h>
-#include <linux/module.h>
-#include <linux/of.h>
-#include <linux/of_dma.h>
-#include <linux/of_platform.h>
-#include <linux/platform_device.h>
-#include <linux/shdma-base.h>
-
-#define to_shdma_chan(c) container_of(c, struct shdma_chan, dma_chan)
-
-static struct dma_chan *shdma_of_xlate(struct of_phandle_args *dma_spec,
-				       struct of_dma *ofdma)
-{
-	u32 id = dma_spec->args[0];
-	dma_cap_mask_t mask;
-	struct dma_chan *chan;
-
-	if (dma_spec->args_count != 1)
-		return NULL;
-
-	dma_cap_zero(mask);
-	/* Only slave DMA channels can be allocated via DT */
-	dma_cap_set(DMA_SLAVE, mask);
-
-	chan = dma_request_channel(mask, shdma_chan_filter,
-				   (void *)(uintptr_t)id);
-	if (chan)
-		to_shdma_chan(chan)->hw_req = id;
-
-	return chan;
-}
-
-static int shdma_of_probe(struct platform_device *pdev)
-{
-	const struct of_dev_auxdata *lookup = dev_get_platdata(&pdev->dev);
-	int ret;
-
-	ret = of_dma_controller_register(pdev->dev.of_node,
-					 shdma_of_xlate, pdev);
-	if (ret < 0)
-		return ret;
-
-	ret = of_platform_populate(pdev->dev.of_node, NULL, lookup, &pdev->dev);
-	if (ret < 0)
-		of_dma_controller_free(pdev->dev.of_node);
-
-	return ret;
-}
-
-static const struct of_device_id shdma_of_match[] = {
-	{ .compatible = "renesas,shdma-mux", },
-	{ }
-};
-MODULE_DEVICE_TABLE(of, sh_dmae_of_match);
-
-static struct platform_driver shdma_of = {
-	.driver		= {
-		.name	= "shdma-of",
-		.of_match_table = shdma_of_match,
-	},
-	.probe		= shdma_of_probe,
-};
-
-module_platform_driver(shdma_of);
-
-MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("SH-DMA driver DT glue");
-MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
-- 
2.25.1


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

* [PATCH 3/3] ARM: dts: r8a73a4: Remove non-functional DMA support
       [not found] <cover.1623406640.git.geert+renesas@glider.be>
  2021-06-11 10:18 ` [PATCH 1/3] dt-bindings: dmaengine: Remove SHDMA Device Tree bindings Geert Uytterhoeven
  2021-06-11 10:18 ` [PATCH 2/3] dmaengine: sh: Remove unused shdma-of driver Geert Uytterhoeven
@ 2021-06-11 10:18 ` Geert Uytterhoeven
  2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2021-06-11 10:18 UTC (permalink / raw)
  To: Rob Herring, Vinod Koul, Magnus Damm
  Cc: Guennadi Liakhovetski, Laurent Pinchart, devicetree, dmaengine,
	linux-renesas-soc, linux-sh, linux-arm-kernel,
	Geert Uytterhoeven

The DMA multiplexer node and one DMA controller instance are present,
but DMA support was never fully enabled, cfr. commit a19788612f51b787
("dmaengine: sh: Remove R-Mobile APE6 support").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a73a4.dtsi | 44 ----------------------------------
 1 file changed, 44 deletions(-)

diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
index 0813e70d5b60f353..704b0e4acb4dedf6 100644
--- a/arch/arm/boot/dts/r8a73a4.dtsi
+++ b/arch/arm/boot/dts/r8a73a4.dtsi
@@ -162,50 +162,6 @@ dbsc2: memory-controller@e67a0000 {
 		power-domains = <&pd_a3bc>;
 	};
 
-	dmac: dma-multiplexer {
-		compatible = "renesas,shdma-mux";
-		#dma-cells = <1>;
-		dma-channels = <20>;
-		dma-requests = <256>;
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-
-		dma0: dma-controller@e6700020 {
-			compatible = "renesas,shdma-r8a73a4";
-			reg = <0 0xe6700020 0 0x89e0>;
-			interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>;
-			interrupt-names = "error",
-					"ch0", "ch1", "ch2", "ch3",
-					"ch4", "ch5", "ch6", "ch7",
-					"ch8", "ch9", "ch10", "ch11",
-					"ch12", "ch13", "ch14", "ch15",
-					"ch16", "ch17", "ch18", "ch19";
-			clocks = <&mstp2_clks R8A73A4_CLK_DMAC>;
-			power-domains = <&pd_a3sp>;
-		};
-	};
-
 	i2c5: i2c@e60b0000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
-- 
2.25.1


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

* Re: [PATCH 1/3] dt-bindings: dmaengine: Remove SHDMA Device Tree bindings
  2021-06-11 10:18 ` [PATCH 1/3] dt-bindings: dmaengine: Remove SHDMA Device Tree bindings Geert Uytterhoeven
@ 2021-06-16 17:56   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-06-16 17:56 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Vinod Koul, Magnus Damm, devicetree, dmaengine, linux-arm-kernel,
	Rob Herring, linux-renesas-soc, Guennadi Liakhovetski, linux-sh,
	Laurent Pinchart

On Fri, 11 Jun 2021 12:18:39 +0200, Geert Uytterhoeven wrote:
> Remove the Renesas SHDMA Device Tree bindings, as they are unused.
> The DMA multiplexer node and one DMA controller instance were added to
> the R-Mobile APE6 .dtsi file, but DMA support was never fully enabled,
> cfr. commit a19788612f51b787 ("dmaengine: sh: Remove R-Mobile APE6
> support").
> 
> Note that the mux idea was dropped when implementing support for DMA on
> R-Car Gen2, cfr. renesas,rcar-dmac.yaml.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  .../devicetree/bindings/dma/renesas,shdma.txt | 84 -------------------
>  1 file changed, 84 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/dma/renesas,shdma.txt
> 

Acked-by: Rob Herring <robh@kernel.org>

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

end of thread, other threads:[~2021-06-16 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1623406640.git.geert+renesas@glider.be>
2021-06-11 10:18 ` [PATCH 1/3] dt-bindings: dmaengine: Remove SHDMA Device Tree bindings Geert Uytterhoeven
2021-06-16 17:56   ` Rob Herring
2021-06-11 10:18 ` [PATCH 2/3] dmaengine: sh: Remove unused shdma-of driver Geert Uytterhoeven
2021-06-11 10:18 ` [PATCH 3/3] ARM: dts: r8a73a4: Remove non-functional DMA support Geert Uytterhoeven

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).