All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] dmaengine: rcar-dmac: Add support for R-Car S4-8
@ 2021-12-22 11:45 Yoshihiro Shimoda
  2021-12-22 11:45 ` [PATCH v2 1/2] dt-bindings: renesas,rcar-dmac: Add r8a779f0 support Yoshihiro Shimoda
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yoshihiro Shimoda @ 2021-12-22 11:45 UTC (permalink / raw)
  To: vkoul, robh+dt
  Cc: dmaengine, devicetree, linux-renesas-soc, Yoshihiro Shimoda

This patch series adds support for rcar-dmac of R-Car S4-8.
To use the rcar-dmac, we also need to enable the module clocks
by the following patch:
https://lore.kernel.org/all/20211221052423.597283-1-yoshihiro.shimoda.uh@renesas.com/

Changes from v1:
 - Fix typo in patch 1.
 - Add commit description in patch 2.
 - Rename "V3U" of some definitions/comments to "GEN4" in patch 2.
 - Add Reviewed-by tags in patch 1 and 2.
 - Remove patch 3 of v1 because the patch got acceptance.
https://lore.kernel.org/all/20211221052722.597407-1-yoshihiro.shimoda.uh@renesas.com/

Yoshihiro Shimoda (2):
  dt-bindings: renesas,rcar-dmac: Add r8a779f0 support
  dmaengine: rcar-dmac: Add support for R-Car S4-8

 .../bindings/dma/renesas,rcar-dmac.yaml         |  5 +++++
 drivers/dma/sh/rcar-dmac.c                      | 17 ++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

-- 
2.25.1


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

* [PATCH v2 1/2] dt-bindings: renesas,rcar-dmac: Add r8a779f0 support
  2021-12-22 11:45 [PATCH v2 0/2] dmaengine: rcar-dmac: Add support for R-Car S4-8 Yoshihiro Shimoda
@ 2021-12-22 11:45 ` Yoshihiro Shimoda
  2021-12-22 11:45 ` [PATCH v2 2/2] dmaengine: rcar-dmac: Add support for R-Car S4-8 Yoshihiro Shimoda
  2022-01-03 11:28 ` [PATCH v2 0/2] " Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Yoshihiro Shimoda @ 2021-12-22 11:45 UTC (permalink / raw)
  To: vkoul, robh+dt
  Cc: dmaengine, devicetree, linux-renesas-soc, Yoshihiro Shimoda,
	Geert Uytterhoeven

Document the compatible value for the Direct Memory Access Controller
blocks in the Renesas R-Car S4-8 (R8A779F0) SoC.

The most visible difference with DMAC blocks on other R-Car SoCs
(except R8A779A0) is the move of the per-channel registers to
a separate register block.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml b/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml
index d8142cbd13d3..7c6badf39921 100644
--- a/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml
+++ b/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml
@@ -44,6 +44,10 @@ properties:
       - items:
           - const: renesas,dmac-r8a779a0 # R-Car V3U
 
+      - items:
+          - const: renesas,dmac-r8a779f0 # R-Car S4-8
+          - const: renesas,rcar-gen4-dmac
+
   reg: true
 
   interrupts:
@@ -118,6 +122,7 @@ if:
       contains:
         enum:
           - renesas,dmac-r8a779a0
+          - renesas,rcar-gen4-dmac
 then:
   properties:
     reg:
-- 
2.25.1


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

* [PATCH v2 2/2] dmaengine: rcar-dmac: Add support for R-Car S4-8
  2021-12-22 11:45 [PATCH v2 0/2] dmaengine: rcar-dmac: Add support for R-Car S4-8 Yoshihiro Shimoda
  2021-12-22 11:45 ` [PATCH v2 1/2] dt-bindings: renesas,rcar-dmac: Add r8a779f0 support Yoshihiro Shimoda
@ 2021-12-22 11:45 ` Yoshihiro Shimoda
  2022-01-03 11:28 ` [PATCH v2 0/2] " Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Yoshihiro Shimoda @ 2021-12-22 11:45 UTC (permalink / raw)
  To: vkoul, robh+dt
  Cc: dmaengine, devicetree, linux-renesas-soc, Yoshihiro Shimoda,
	Ulrich Hecht, Geert Uytterhoeven

Add support for R-Car S4-8. We can reuse R-Car V3U code so that
renames variable names as "gen4".

Note that some registers of R-Car V3U do not exist on R-Car S4-8,
but none of them are used by the driver for now.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/dma/sh/rcar-dmac.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index 5c7716fd6bc5..481f45c77ce1 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -236,7 +236,7 @@ struct rcar_dmac_of_data {
 #define RCAR_DMAOR_PRI_ROUND_ROBIN	(3 << 8)
 #define RCAR_DMAOR_AE			(1 << 2)
 #define RCAR_DMAOR_DME			(1 << 0)
-#define RCAR_DMACHCLR			0x0080	/* Not on R-Car V3U */
+#define RCAR_DMACHCLR			0x0080	/* Not on R-Car Gen4 */
 #define RCAR_DMADPSEC			0x00a0
 
 #define RCAR_DMASAR			0x0000
@@ -299,8 +299,8 @@ struct rcar_dmac_of_data {
 #define RCAR_DMAFIXDAR			0x0014
 #define RCAR_DMAFIXDPBASE		0x0060
 
-/* For R-Car V3U */
-#define RCAR_V3U_DMACHCLR		0x0100
+/* For R-Car Gen4 */
+#define RCAR_GEN4_DMACHCLR		0x0100
 
 /* Hardcode the MEMCPY transfer size to 4 bytes. */
 #define RCAR_DMAC_MEMCPY_XFER_SIZE	4
@@ -345,7 +345,7 @@ static void rcar_dmac_chan_clear(struct rcar_dmac *dmac,
 				 struct rcar_dmac_chan *chan)
 {
 	if (dmac->chan_base)
-		rcar_dmac_chan_write(chan, RCAR_V3U_DMACHCLR, 1);
+		rcar_dmac_chan_write(chan, RCAR_GEN4_DMACHCLR, 1);
 	else
 		rcar_dmac_write(dmac, RCAR_DMACHCLR, BIT(chan->index));
 }
@@ -357,7 +357,7 @@ static void rcar_dmac_chan_clear_all(struct rcar_dmac *dmac)
 
 	if (dmac->chan_base) {
 		for_each_rcar_dmac_chan(i, dmac, chan)
-			rcar_dmac_chan_write(chan, RCAR_V3U_DMACHCLR, 1);
+			rcar_dmac_chan_write(chan, RCAR_GEN4_DMACHCLR, 1);
 	} else {
 		rcar_dmac_write(dmac, RCAR_DMACHCLR, dmac->channels_mask);
 	}
@@ -2009,7 +2009,7 @@ static const struct rcar_dmac_of_data rcar_dmac_data = {
 	.chan_offset_stride	= 0x80,
 };
 
-static const struct rcar_dmac_of_data rcar_v3u_dmac_data = {
+static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
 	.chan_offset_base	= 0x0,
 	.chan_offset_stride	= 0x1000,
 };
@@ -2018,9 +2018,12 @@ static const struct of_device_id rcar_dmac_of_ids[] = {
 	{
 		.compatible = "renesas,rcar-dmac",
 		.data = &rcar_dmac_data,
+	}, {
+		.compatible = "renesas,rcar-gen4-dmac",
+		.data = &rcar_gen4_dmac_data,
 	}, {
 		.compatible = "renesas,dmac-r8a779a0",
-		.data = &rcar_v3u_dmac_data,
+		.data = &rcar_gen4_dmac_data,
 	},
 	{ /* Sentinel */ }
 };
-- 
2.25.1


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

* Re: [PATCH v2 0/2] dmaengine: rcar-dmac: Add support for R-Car S4-8
  2021-12-22 11:45 [PATCH v2 0/2] dmaengine: rcar-dmac: Add support for R-Car S4-8 Yoshihiro Shimoda
  2021-12-22 11:45 ` [PATCH v2 1/2] dt-bindings: renesas,rcar-dmac: Add r8a779f0 support Yoshihiro Shimoda
  2021-12-22 11:45 ` [PATCH v2 2/2] dmaengine: rcar-dmac: Add support for R-Car S4-8 Yoshihiro Shimoda
@ 2022-01-03 11:28 ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2022-01-03 11:28 UTC (permalink / raw)
  To: Yoshihiro Shimoda; +Cc: robh+dt, dmaengine, devicetree, linux-renesas-soc

On 22-12-21, 20:45, Yoshihiro Shimoda wrote:
> This patch series adds support for rcar-dmac of R-Car S4-8.
> To use the rcar-dmac, we also need to enable the module clocks
> by the following patch:
> https://lore.kernel.org/all/20211221052423.597283-1-yoshihiro.shimoda.uh@renesas.com/

Applied, thanks

-- 
~Vinod

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 11:45 [PATCH v2 0/2] dmaengine: rcar-dmac: Add support for R-Car S4-8 Yoshihiro Shimoda
2021-12-22 11:45 ` [PATCH v2 1/2] dt-bindings: renesas,rcar-dmac: Add r8a779f0 support Yoshihiro Shimoda
2021-12-22 11:45 ` [PATCH v2 2/2] dmaengine: rcar-dmac: Add support for R-Car S4-8 Yoshihiro Shimoda
2022-01-03 11:28 ` [PATCH v2 0/2] " Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.