Skip to contentSkip to conversation

r8a7796 SYS-DMAC integration

PATCH In review Ulrich Hecht 4 participants 13 messages Sep 14, 2016 – Oct 31, 2016

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover r8a7796 SYS-DMAC integration

Hi!

This enables the three DMA controllers. Identical to the setup on r8a7795. Based on renesas-drivers-2016-09-13-v4.8-rc6.

CU
Uli

Ulrich Hecht (3):
clk: renesas: r8a7796: Add SYS-DMAC clocks
arm64: renesas: r8a7796: add SYS-DMAC controller nodes
dmaengine: rcar-dmac: Document R-Car M3-W bindings

 .../devicetree/bindings/dma/renesas,rcar-dmac.txt  |  1 +
 arch/arm64/boot/dts/renesas/r8a7796.dtsi           | 99 ++++++++++++++++++++++
 drivers/clk/renesas/r8a7796-cpg-mssr.c             |  3 +
 3 files changed, 103 insertions(+)
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/3 clk: renesas: r8a7796: Add SYS-DMAC clocks

---
 drivers/clk/renesas/r8a7796-cpg-mssr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/clk/renesas/r8a7796-cpg-mssr.c +3 -0
index eb347ed..c02fe34 100644
@@ -109,6 +109,9 @@ static const struct cpg_core_clk r8a7796_core_clks[] __initconst = {
 };
 
 static const struct mssr_mod_clk r8a7796_mod_clks[] __initconst = {
+	DEF_MOD("sys-dmac2",		 217,	R8A7796_CLK_S3D1),
+	DEF_MOD("sys-dmac1",		 218,	R8A7796_CLK_S3D1),
+	DEF_MOD("sys-dmac0",		 219,	R8A7796_CLK_S3D1),
 	DEF_MOD("cmt3",			 300,	R8A7796_CLK_R),
 	DEF_MOD("cmt2",			 301,	R8A7796_CLK_R),
 	DEF_MOD("cmt1",			 302,	R8A7796_CLK_R),
Signature · 1 line
2.9.3
#2 lore raw

Re: [PATCH 1/3] clk: renesas: r8a7796: Add SYS-DMAC clocks

Quoted 10 lines · Ulrich Hecht
---
 drivers/clk/renesas/r8a7796-cpg-mssr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/clk/renesas/r8a7796-cpg-mssr.c +0 -0
index eb347ed..c02fe34 100644

drivers/clk/renesas/r8a7796-cpg-mssr.c static const struct cpg_core_clk r8a7796_core_clks[] __initconst = { · line 114

Quoted 6 lines
drivers/clk/renesas/r8a7796-cpg-mssr.c +3 -0
@@ -109,6 +109,9 @@ static const struct cpg_core_clk r8a7796_core_clks[] __initconst = {
 };
 
 static const struct mssr_mod_clk r8a7796_mod_clks[] __initconst = {
+       DEF_MOD("sys-dmac2",             217,   R8A7796_CLK_S3D1),
+       DEF_MOD("sys-dmac1",             218,   R8A7796_CLK_S3D1),
+       DEF_MOD("sys-dmac0",             219,   R8A7796_CLK_S3D1),

It's not clear from the documentation what the actual parent clock is. The datasheet says "ZS", which we know is S3D1 on H3. However, Table 50.2 says ZS is S0D3 on M3-W (and H3 ES2.0)....

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw

Re: [PATCH 1/3] clk: renesas: r8a7796: Add SYS-DMAC clocks

Quoted 14 lines · Geert Uytterhoeven
Quoted 12 lines · Ulrich Hecht
---
 drivers/clk/renesas/r8a7796-cpg-mssr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/clk/renesas/r8a7796-cpg-mssr.c +0 -0
index eb347ed..c02fe34 100644
@@ -109,6 +109,9 @@ static const struct cpg_core_clk r8a7796_core_clks[] __initconst = {
 };
 
Quoted 8 lines

drivers/clk/renesas/r8a7796-cpg-mssr.c static const struct cpg_core_clk r8a7796_core_clks[] __initconst = { · line 114

Quoted 4 lines
drivers/clk/renesas/r8a7796-cpg-mssr.c +3 -0
 static const struct mssr_mod_clk r8a7796_mod_clks[] __initconst = {
+       DEF_MOD("sys-dmac2",             217,   R8A7796_CLK_S3D1),
+       DEF_MOD("sys-dmac1",             218,   R8A7796_CLK_S3D1),
+       DEF_MOD("sys-dmac0",             219,   R8A7796_CLK_S3D1),

It's not clear from the documentation what the actual parent clock is. The datasheet says "ZS", which we know is S3D1 on H3. However, Table 50.2 says ZS is S0D3 on M3-W (and H3 ES2.0)....

Queuing in clk-renesas-for-v4.10 with parent clock fixed to S0D3.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#4 lore raw

PATCH 2/3 arm64: renesas: r8a7796: add SYS-DMAC controller nodes

In reply to Ulrich Hecht
---
 arch/arm64/boot/dts/renesas/r8a7796.dtsi | 99 ++++++++++++++++++++++++++++++++
 1 file changed, 99 insertions(+)
arch/arm64/boot/dts/renesas/r8a7796.dtsi +99 -0
index 3aae29f..d7590c3 100644
@@ -252,6 +252,105 @@
 			status = "disabled";
 		};
 
+		dmac0: dma-controller@e6700000 {
+			compatible = "renesas,dmac-r8a7796",
+				     "renesas,rcar-dmac";
+			reg = <0 0xe6700000 0 0x10000>;
+			interrupts = <GIC_SPI 199 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>;
+			interrupt-names = "error",
+					"ch0", "ch1", "ch2", "ch3",
+					"ch4", "ch5", "ch6", "ch7",
+					"ch8", "ch9", "ch10", "ch11",
+					"ch12", "ch13", "ch14", "ch15";
+			clocks = <&cpg CPG_MOD 219>;
+			clock-names = "fck";
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			#dma-cells = <1>;
+			dma-channels = <16>;
+		};
+
+		dmac1: dma-controller@e7300000 {
+			compatible = "renesas,dmac-r8a7796",
+				     "renesas,rcar-dmac";
+			reg = <0 0xe7300000 0 0x10000>;
+			interrupts = <GIC_SPI 220 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
+				      GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "error",
+					"ch0", "ch1", "ch2", "ch3",
+					"ch4", "ch5", "ch6", "ch7",
+					"ch8", "ch9", "ch10", "ch11",
+					"ch12", "ch13", "ch14", "ch15";
+			clocks = <&cpg CPG_MOD 218>;
+			clock-names = "fck";
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			#dma-cells = <1>;
+			dma-channels = <16>;
+		};
+
+		dmac2: dma-controller@e7310000 {
+			compatible = "renesas,dmac-r8a7796",
+				     "renesas,rcar-dmac";
+			reg = <0 0xe7310000 0 0x10000>;
+			interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "error",
+					"ch0", "ch1", "ch2", "ch3",
+					"ch4", "ch5", "ch6", "ch7",
+					"ch8", "ch9", "ch10", "ch11",
+					"ch12", "ch13", "ch14", "ch15";
+			clocks = <&cpg CPG_MOD 217>;
+			clock-names = "fck";
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			#dma-cells = <1>;
+			dma-channels = <16>;
+		};
+
 		sdhi0: sd@ee100000 {
 			compatible = "renesas,sdhi-r8a7796";
 			reg = <0 0xee100000 0 0x2000>;
Signature · 1 line
2.9.3
Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] arm64: renesas: r8a7796: add SYS-DMAC controller nodes

Quoted 1 line · Ulrich Hecht

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#7 lore raw

PATCH 3/3 dmaengine: rcar-dmac: Document R-Car M3-W bindings

In reply to Ulrich Hecht
---
 Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt +1 -0
index 5b902ac..5df8f4e 100644
@@ -22,6 +22,7 @@ Required Properties:
 		- "renesas,dmac-r8a7793" (R-Car M2-N)
 		- "renesas,dmac-r8a7794" (R-Car E2)
 		- "renesas,dmac-r8a7795" (R-Car H3)
+		- "renesas,dmac-r8a7796" (R-Car M3-W)
 
 - reg: base address and length of the registers block for the DMAC
 
Signature · 1 line
2.9.3
Reviewed-by on v1 3/3
#8 lore raw

Re: [PATCH 3/3] dmaengine: rcar-dmac: Document R-Car M3-W bindings

Quoted 1 line · Ulrich Hecht

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer
#9 lore raw
In reply to Ulrich Hecht

Hi Ulrich, Simon, everyone,

Quoted 5 lines · Ulrich Hecht

Hi!

This enables the three DMA controllers. Identical to the setup on r8a7795. Based on renesas-drivers-2016-09-13-v4.8-rc6.

Quoted 8 lines

CU
Uli

Ulrich Hecht (3):
clk: renesas: r8a7796: Add SYS-DMAC clocks
arm64: renesas: r8a7796: add SYS-DMAC controller nodes
dmaengine: rcar-dmac: Document R-Car M3-W bindings

Thanks for your efforts. I noticed that the clock bits have been queued up by Geert, but other parts seem to be missing.

Can you please ping/poke/resend or whatever is needed to move the rest of the series forward?

Best,

/ magnus

#10 lore raw
Quoted 18 lines · Magnus Damm

Hi Ulrich, Simon, everyone,

Quoted 5 lines · Ulrich Hecht

Hi!

This enables the three DMA controllers. Identical to the setup on r8a7795. Based on renesas-drivers-2016-09-13-v4.8-rc6.

Quoted 8 lines

CU
Uli

Ulrich Hecht (3):
clk: renesas: r8a7796: Add SYS-DMAC clocks
arm64: renesas: r8a7796: add SYS-DMAC controller nodes
dmaengine: rcar-dmac: Document R-Car M3-W bindings

Quoted 5 lines

Thanks for your efforts. I noticed that the clock bits have been queued up by Geert, but other parts seem to be missing.

Can you please ping/poke/resend or whatever is needed to move the rest of the series forward?

I'm happy to queue up the arm64 patch (which Ulrich recently pinged me about). But I wanted to first confirm that it doesn't haven any implications for enabling 64bit memory.

maintainer
#11 lore raw

Hi Simon,

Quoted 22 lines · Simon Horman
Quoted 21 lines · Magnus Damm

Hi Ulrich, Simon, everyone,

Quoted 5 lines · Ulrich Hecht

Hi!

This enables the three DMA controllers. Identical to the setup on r8a7795. Based on renesas-drivers-2016-09-13-v4.8-rc6.

Quoted 8 lines

CU
Uli

Ulrich Hecht (3):
clk: renesas: r8a7796: Add SYS-DMAC clocks
arm64: renesas: r8a7796: add SYS-DMAC controller nodes
dmaengine: rcar-dmac: Document R-Car M3-W bindings

Thanks for your efforts. I noticed that the clock bits have been queued up by Geert, but other parts seem to be missing.

Quoted 6 lines
Quoted 2 lines

Can you please ping/poke/resend or whatever is needed to move the rest of the series forward?

I'm happy to queue up the arm64 patch (which Ulrich recently pinged me about). But I wanted to first confirm that it doesn't haven any implications for enabling 64bit memory.

Thanks. The SYS-DMAC hardware is a rare case that is able to perform 64-bit bus mastering without the IPMMU, so it is fine to enable at this point even though the IPMMU is not available.

Cheers,

/ magnus

#12 lore raw
Quoted 28 lines · Magnus Damm

Hi Simon,

Quoted 25 lines · Simon Horman
Quoted 23 lines · Magnus Damm

Hi Ulrich, Simon, everyone,

Quoted 5 lines · Ulrich Hecht

Hi!

This enables the three DMA controllers. Identical to the setup on r8a7795. Based on renesas-drivers-2016-09-13-v4.8-rc6.

Quoted 8 lines

CU
Uli

Ulrich Hecht (3):
clk: renesas: r8a7796: Add SYS-DMAC clocks
arm64: renesas: r8a7796: add SYS-DMAC controller nodes
dmaengine: rcar-dmac: Document R-Car M3-W bindings

Thanks for your efforts. I noticed that the clock bits have been queued up by Geert, but other parts seem to be missing.

Can you please ping/poke/resend or whatever is needed to move the rest of the series forward?

Quoted 7 lines
Quoted 3 lines

I'm happy to queue up the arm64 patch (which Ulrich recently pinged me about). But I wanted to first confirm that it doesn't haven any implications for enabling 64bit memory.

Thanks. The SYS-DMAC hardware is a rare case that is able to perform 64-bit bus mastering without the IPMMU, so it is fine to enable at this point even though the IPMMU is not available.

Hi Magnus,

thanks for clarifying that. I have queued up the "arm64" patch listed above.