Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] r8a7796 SCIF integration
@ 2016-12-07 16:44 Ulrich Hecht
  2016-12-07 16:44 ` [PATCH v2 1/3] clk: renesas: r8a7796: Add SCIF clocks Ulrich Hecht
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Ulrich Hecht @ 2016-12-07 16:44 UTC (permalink / raw)
  To: linux-renesas-soc, horms, geert; +Cc: magnus.damm, Ulrich Hecht

Hi!

This revision fixes the completely incorrect DMA assignments (must have
looked in the wrong datasheet), and adds dmac2 references and Reviewed-bys
where appropriate.

Based on renesas-devel-20161207-v4.9-rc8.

CU
Uli


Ulrich Hecht (3):
  clk: renesas: r8a7796: Add SCIF clocks
  arm64: renesas: r8a7796: Add all SCIF nodes
  arm64: renesas: r8a7796: Enable SCIF DMA

 arch/arm64/boot/dts/renesas/r8a7796.dtsi | 78 ++++++++++++++++++++++++++++++++
 drivers/clk/renesas/r8a7796-cpg-mssr.c   |  5 ++
 2 files changed, 83 insertions(+)

-- 
2.7.4

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

* [PATCH v2 1/3] clk: renesas: r8a7796: Add SCIF clocks
  2016-12-07 16:44 [PATCH v2 0/3] r8a7796 SCIF integration Ulrich Hecht
@ 2016-12-07 16:44 ` Ulrich Hecht
  2016-12-09  9:12   ` Geert Uytterhoeven
  2016-12-07 16:44 ` [PATCH v2 2/3] arm64: renesas: r8a7796: Add all SCIF nodes Ulrich Hecht
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Ulrich Hecht @ 2016-12-07 16:44 UTC (permalink / raw)
  To: linux-renesas-soc, horms, geert; +Cc: magnus.damm, Ulrich Hecht

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/renesas/r8a7796-cpg-mssr.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
index 1c144b2..5ab8bed 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -110,6 +110,11 @@ static const struct cpg_core_clk r8a7796_core_clks[] __initconst = {
 };
 
 static const struct mssr_mod_clk r8a7796_mod_clks[] __initconst = {
+	DEF_MOD("scif5",		 202,	R8A7796_CLK_S3D4),
+	DEF_MOD("scif4",		 203,	R8A7796_CLK_S3D4),
+	DEF_MOD("scif3",		 204,	R8A7796_CLK_S3D4),
+	DEF_MOD("scif1",		 206,	R8A7796_CLK_S3D4),
+	DEF_MOD("scif0",		 207,	R8A7796_CLK_S3D4),
 	DEF_MOD("cmt3",			 300,	R8A7796_CLK_R),
 	DEF_MOD("cmt2",			 301,	R8A7796_CLK_R),
 	DEF_MOD("cmt1",			 302,	R8A7796_CLK_R),
-- 
2.7.4

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

* [PATCH v2 2/3] arm64: renesas: r8a7796: Add all SCIF nodes
  2016-12-07 16:44 [PATCH v2 0/3] r8a7796 SCIF integration Ulrich Hecht
  2016-12-07 16:44 ` [PATCH v2 1/3] clk: renesas: r8a7796: Add SCIF clocks Ulrich Hecht
@ 2016-12-07 16:44 ` Ulrich Hecht
  2016-12-08  9:06   ` Sergei Shtylyov
  2016-12-07 16:44 ` [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA Ulrich Hecht
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Ulrich Hecht @ 2016-12-07 16:44 UTC (permalink / raw)
  To: linux-renesas-soc, horms, geert; +Cc: magnus.damm, Ulrich Hecht

Add the device nodes for all R-Car H3 SCIF serial ports, incl. clocks
and clock domain.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm64/boot/dts/renesas/r8a7796.dtsi | 65 ++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index 7bf0f2f..c5f0df5 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -421,6 +421,32 @@
 			};
 		};
 
+		scif0: serial@e6e60000 {
+			compatible = "renesas,scif-r8a7796",
+				     "renesas,rcar-gen3-scif", "renesas,scif";
+			reg = <0 0xe6e60000 0 64>;
+			interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 207>,
+				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		scif1: serial@e6e68000 {
+			compatible = "renesas,scif-r8a7796",
+				     "renesas,rcar-gen3-scif", "renesas,scif";
+			reg = <0 0xe6e68000 0 64>;
+			interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 206>,
+				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		scif2: serial@e6e88000 {
 			compatible = "renesas,scif-r8a7796",
 				     "renesas,rcar-gen3-scif", "renesas,scif";
@@ -434,6 +460,45 @@
 			status = "disabled";
 		};
 
+		scif3: serial@e6c50000 {
+			compatible = "renesas,scif-r8a7796",
+				     "renesas,rcar-gen3-scif", "renesas,scif";
+			reg = <0 0xe6c50000 0 64>;
+			interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 204>,
+				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		scif4: serial@e6c40000 {
+			compatible = "renesas,scif-r8a7796",
+				     "renesas,rcar-gen3-scif", "renesas,scif";
+			reg = <0 0xe6c40000 0 64>;
+			interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 203>,
+				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		scif5: serial@e6f30000 {
+			compatible = "renesas,scif-r8a7796",
+				     "renesas,rcar-gen3-scif", "renesas,scif";
+			reg = <0 0xe6f30000 0 64>;
+			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 202>,
+				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		msiof0: spi@e6e90000 {
 			compatible = "renesas,msiof-r8a7796";
 			reg = <0 0xe6e90000 0 0x0064>;
-- 
2.7.4

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

* [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA
  2016-12-07 16:44 [PATCH v2 0/3] r8a7796 SCIF integration Ulrich Hecht
  2016-12-07 16:44 ` [PATCH v2 1/3] clk: renesas: r8a7796: Add SCIF clocks Ulrich Hecht
  2016-12-07 16:44 ` [PATCH v2 2/3] arm64: renesas: r8a7796: Add all SCIF nodes Ulrich Hecht
@ 2016-12-07 16:44 ` Ulrich Hecht
  2016-12-09  9:38   ` Geert Uytterhoeven
  2017-02-21 14:27   ` Geert Uytterhoeven
  2016-12-08 13:34 ` [PATCH v2 0/3] r8a7796 SCIF integration Simon Horman
  2016-12-09  9:42 ` Geert Uytterhoeven
  4 siblings, 2 replies; 13+ messages in thread
From: Ulrich Hecht @ 2016-12-07 16:44 UTC (permalink / raw)
  To: linux-renesas-soc, horms, geert; +Cc: magnus.damm, Ulrich Hecht

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 arch/arm64/boot/dts/renesas/r8a7796.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index c5f0df5..782063a 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -430,6 +430,9 @@
 				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac1 0x51>, <&dmac1 0x50>,
+			       <&dmac2 0x51>, <&dmac2 0x50>;
+			dma-names = "tx", "rx", "tx", "rx";
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
 			status = "disabled";
 		};
@@ -443,6 +446,9 @@
 				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac1 0x53>, <&dmac1 0x52>,
+			       <&dmac2 0x53>, <&dmac2 0x52>;
+			dma-names = "tx", "rx", "tx", "rx";
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
 			status = "disabled";
 		};
@@ -456,6 +462,8 @@
 				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac0 0x57>, <&dmac0 0x56>;
+			dma-names = "tx", "rx";
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
 			status = "disabled";
 		};
@@ -469,6 +477,8 @@
 				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac0 0x59>, <&dmac0 0x58>;
+			dma-names = "tx", "rx";
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
 			status = "disabled";
 		};
@@ -482,6 +492,9 @@
 				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac1 0x5b>, <&dmac1 0x5a>,
+			       <&dmac2 0x5b>, <&dmac2 0x5a>;
+			dma-names = "tx", "rx", "tx", "rx";
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
 			status = "disabled";
 		};
-- 
2.7.4

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

* Re: [PATCH v2 2/3] arm64: renesas: r8a7796: Add all SCIF nodes
  2016-12-07 16:44 ` [PATCH v2 2/3] arm64: renesas: r8a7796: Add all SCIF nodes Ulrich Hecht
@ 2016-12-08  9:06   ` Sergei Shtylyov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergei Shtylyov @ 2016-12-08  9:06 UTC (permalink / raw)
  To: Ulrich Hecht, linux-renesas-soc, horms, geert; +Cc: magnus.damm

Hello!

On 12/7/2016 7:44 PM, Ulrich Hecht wrote:

> Add the device nodes for all R-Car H3 SCIF serial ports, incl. clocks
> and clock domain.

    Not power domain?

> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  arch/arm64/boot/dts/renesas/r8a7796.dtsi | 65 ++++++++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> index 7bf0f2f..c5f0df5 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> @@ -421,6 +421,32 @@
>  			};
>  		};
>
> +		scif0: serial@e6e60000 {
> +			compatible = "renesas,scif-r8a7796",
> +				     "renesas,rcar-gen3-scif", "renesas,scif";
> +			reg = <0 0xe6e60000 0 64>;

     0x40, perhaps?

> +			interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&cpg CPG_MOD 207>,
> +				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
> +				 <&scif_clk>;
> +			clock-names = "fck", "brg_int", "scif_clk";
> +			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
> +		scif1: serial@e6e68000 {
> +			compatible = "renesas,scif-r8a7796",
> +				     "renesas,rcar-gen3-scif", "renesas,scif";
> +			reg = <0 0xe6e68000 0 64>;

    Same here...

> +			interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&cpg CPG_MOD 206>,
> +				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
> +				 <&scif_clk>;
> +			clock-names = "fck", "brg_int", "scif_clk";
> +			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
>  		scif2: serial@e6e88000 {
>  			compatible = "renesas,scif-r8a7796",
>  				     "renesas,rcar-gen3-scif", "renesas,scif";
> @@ -434,6 +460,45 @@
>  			status = "disabled";
>  		};
>
> +		scif3: serial@e6c50000 {
> +			compatible = "renesas,scif-r8a7796",
> +				     "renesas,rcar-gen3-scif", "renesas,scif";
> +			reg = <0 0xe6c50000 0 64>;

    And here...

> +			interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&cpg CPG_MOD 204>,
> +				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
> +				 <&scif_clk>;
> +			clock-names = "fck", "brg_int", "scif_clk";
> +			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
> +		scif4: serial@e6c40000 {
> +			compatible = "renesas,scif-r8a7796",
> +				     "renesas,rcar-gen3-scif", "renesas,scif";
> +			reg = <0 0xe6c40000 0 64>;

    And here...

> +			interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&cpg CPG_MOD 203>,
> +				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
> +				 <&scif_clk>;
> +			clock-names = "fck", "brg_int", "scif_clk";
> +			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
> +		scif5: serial@e6f30000 {
> +			compatible = "renesas,scif-r8a7796",
> +				     "renesas,rcar-gen3-scif", "renesas,scif";
> +			reg = <0 0xe6f30000 0 64>;

    And here...

> +			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&cpg CPG_MOD 202>,
> +				 <&cpg CPG_CORE R8A7796_CLK_S3D1>,
> +				 <&scif_clk>;
> +			clock-names = "fck", "brg_int", "scif_clk";
> +			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
>  		msiof0: spi@e6e90000 {
>  			compatible = "renesas,msiof-r8a7796";
>  			reg = <0 0xe6e90000 0 0x0064>;

MBR, Sergei

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

* Re: [PATCH v2 0/3] r8a7796 SCIF integration
  2016-12-07 16:44 [PATCH v2 0/3] r8a7796 SCIF integration Ulrich Hecht
                   ` (2 preceding siblings ...)
  2016-12-07 16:44 ` [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA Ulrich Hecht
@ 2016-12-08 13:34 ` Simon Horman
  2016-12-09  9:42 ` Geert Uytterhoeven
  4 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2016-12-08 13:34 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: linux-renesas-soc, geert, magnus.damm, Sergei Shtylyov

On Wed, Dec 07, 2016 at 05:44:24PM +0100, Ulrich Hecht wrote:
> Hi!
> 
> This revision fixes the completely incorrect DMA assignments (must have
> looked in the wrong datasheet), and adds dmac2 references and Reviewed-bys
> where appropriate.
> 
> Based on renesas-devel-20161207-v4.9-rc8.

Hi Ulrich,

please consider addressing Sergei's review and reposting as appropriate.

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

* Re: [PATCH v2 1/3] clk: renesas: r8a7796: Add SCIF clocks
  2016-12-07 16:44 ` [PATCH v2 1/3] clk: renesas: r8a7796: Add SCIF clocks Ulrich Hecht
@ 2016-12-09  9:12   ` Geert Uytterhoeven
  0 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2016-12-09  9:12 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: Linux-Renesas, Simon Horman, Magnus Damm

On Wed, Dec 7, 2016 at 5:44 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Already in clk-next.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA
  2016-12-07 16:44 ` [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA Ulrich Hecht
@ 2016-12-09  9:38   ` Geert Uytterhoeven
  2017-02-21 14:27   ` Geert Uytterhoeven
  1 sibling, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2016-12-09  9:38 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: Linux-Renesas, Simon Horman, Magnus Damm

On Wed, Dec 7, 2016 at 5:44 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH v2 0/3] r8a7796 SCIF integration
  2016-12-07 16:44 [PATCH v2 0/3] r8a7796 SCIF integration Ulrich Hecht
                   ` (3 preceding siblings ...)
  2016-12-08 13:34 ` [PATCH v2 0/3] r8a7796 SCIF integration Simon Horman
@ 2016-12-09  9:42 ` Geert Uytterhoeven
  4 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2016-12-09  9:42 UTC (permalink / raw)
  To: Ulrich Hecht; +Cc: Linux-Renesas, Simon Horman, Magnus Damm

Hi Ulrich,

On Wed, Dec 7, 2016 at 5:44 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> This revision fixes the completely incorrect DMA assignments (must have
> looked in the wrong datasheet), and adds dmac2 references and Reviewed-bys
> where appropriate.

You mean the dmas for SCIF2?
They are not (no longer?) present in the datasheet, but they do seem to work, on
both H3 and M3-W.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA
  2016-12-07 16:44 ` [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA Ulrich Hecht
  2016-12-09  9:38   ` Geert Uytterhoeven
@ 2017-02-21 14:27   ` Geert Uytterhoeven
  2017-03-02 14:36     ` Simon Horman
  1 sibling, 1 reply; 13+ messages in thread
From: Geert Uytterhoeven @ 2017-02-21 14:27 UTC (permalink / raw)
  To: Simon Horman; +Cc: Linux-Renesas, Ulrich Hecht, Magnus Damm

Hi Simon,

On Wed, Dec 7, 2016 at 5:44 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
>  arch/arm64/boot/dts/renesas/r8a7796.dtsi | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> index c5f0df5..782063a 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> @@ -430,6 +430,9 @@
>                                  <&cpg CPG_CORE R8A7796_CLK_S3D1>,
>                                  <&scif_clk>;
>                         clock-names = "fck", "brg_int", "scif_clk";
> +                       dmas = <&dmac1 0x51>, <&dmac1 0x50>,
> +                              <&dmac2 0x51>, <&dmac2 0x50>;
> +                       dma-names = "tx", "rx", "tx", "rx";
>                         power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
>                         status = "disabled";

Apparently the DMA properties were added to the HSCIF nodes instead
of the SCIF nodes while applying this patch?

3 lines of context is not sufficient to distinguish between the various SCIF
and HSCIF nodes :-(

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA
  2017-02-21 14:27   ` Geert Uytterhoeven
@ 2017-03-02 14:36     ` Simon Horman
  2017-03-03  9:54       ` Geert Uytterhoeven
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Horman @ 2017-03-02 14:36 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Ulrich Hecht, Magnus Damm

On Tue, Feb 21, 2017 at 03:27:25PM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Wed, Dec 7, 2016 at 5:44 PM, Ulrich Hecht
> <ulrich.hecht+renesas@gmail.com> wrote:
> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> > ---
> >  arch/arm64/boot/dts/renesas/r8a7796.dtsi | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> > index c5f0df5..782063a 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> > @@ -430,6 +430,9 @@
> >                                  <&cpg CPG_CORE R8A7796_CLK_S3D1>,
> >                                  <&scif_clk>;
> >                         clock-names = "fck", "brg_int", "scif_clk";
> > +                       dmas = <&dmac1 0x51>, <&dmac1 0x50>,
> > +                              <&dmac2 0x51>, <&dmac2 0x50>;
> > +                       dma-names = "tx", "rx", "tx", "rx";
> >                         power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
> >                         status = "disabled";
> 
> Apparently the DMA properties were added to the HSCIF nodes instead
> of the SCIF nodes while applying this patch?
> 
> 3 lines of context is not sufficient to distinguish between the various SCIF
> and HSCIF nodes :-(

Thanks, I have updated renesas-devel accordingly.

I notice in renesas-devel there seems to be one "tx", "rx" DMA per SCIF
rather than two added in Ulrich's patch. Is there a reason for that?

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

* Re: [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA
  2017-03-02 14:36     ` Simon Horman
@ 2017-03-03  9:54       ` Geert Uytterhoeven
  2017-03-06  8:44         ` Simon Horman
  0 siblings, 1 reply; 13+ messages in thread
From: Geert Uytterhoeven @ 2017-03-03  9:54 UTC (permalink / raw)
  To: Simon Horman; +Cc: Linux-Renesas, Ulrich Hecht, Magnus Damm

Hi Simon,

On Thu, Mar 2, 2017 at 3:36 PM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Feb 21, 2017 at 03:27:25PM +0100, Geert Uytterhoeven wrote:
>> On Wed, Dec 7, 2016 at 5:44 PM, Ulrich Hecht
>> <ulrich.hecht+renesas@gmail.com> wrote:
>> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
>> > ---
>> >  arch/arm64/boot/dts/renesas/r8a7796.dtsi | 13 +++++++++++++
>> >  1 file changed, 13 insertions(+)
>> >
>> > diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
>> > index c5f0df5..782063a 100644
>> > --- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
>> > +++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
>> > @@ -430,6 +430,9 @@
>> >                                  <&cpg CPG_CORE R8A7796_CLK_S3D1>,
>> >                                  <&scif_clk>;
>> >                         clock-names = "fck", "brg_int", "scif_clk";
>> > +                       dmas = <&dmac1 0x51>, <&dmac1 0x50>,
>> > +                              <&dmac2 0x51>, <&dmac2 0x50>;
>> > +                       dma-names = "tx", "rx", "tx", "rx";
>> >                         power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
>> >                         status = "disabled";
>>
>> Apparently the DMA properties were added to the HSCIF nodes instead
>> of the SCIF nodes while applying this patch?
>>
>> 3 lines of context is not sufficient to distinguish between the various SCIF
>> and HSCIF nodes :-(
>
> Thanks, I have updated renesas-devel accordingly.
>
> I notice in renesas-devel there seems to be one "tx", "rx" DMA per SCIF
> rather than two added in Ulrich's patch. Is there a reason for that?

You mean renesas-drivers?

Oops, looks like I cherry-picked an older version of the patch, and failed to
notice after reverting your wrong version
(perhaps the final version was never part of a pull request from Uli?).

BTW, your version  is wrong, too: the second pair of DMA channels
should point to dmac2, not dmac1, e.g.:

                  scif0: serial@e6e60000 {
                          compatible = "renesas,scif-r8a7796",
                                       "renesas,rcar-gen3-scif", "renesas,scif";
                          reg = <0 0xe6e60000 0 64>;
                          interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
                          clocks = <&cpg CPG_MOD 207>,
                                   <&cpg CPG_CORE R8A7796_CLK_S3D1>,
                                   <&scif_clk>;
                          clock-names = "fck", "brg_int", "scif_clk";
  +                       dmas = <&dmac1 0x51>, <&dmac1 0x50>,
- +                              <&dmac1 0x51>, <&dmac1 0x50>;
+ +                              <&dmac2 0x51>, <&dmac2 0x50>;

  +                       dma-names = "tx", "rx", "tx", "rx";
                          power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
                          status = "disabled";
                  };

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA
  2017-03-03  9:54       ` Geert Uytterhoeven
@ 2017-03-06  8:44         ` Simon Horman
  0 siblings, 0 replies; 13+ messages in thread
From: Simon Horman @ 2017-03-06  8:44 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas, Ulrich Hecht, Magnus Damm

On Fri, Mar 03, 2017 at 10:54:01AM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Thu, Mar 2, 2017 at 3:36 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Tue, Feb 21, 2017 at 03:27:25PM +0100, Geert Uytterhoeven wrote:
> >> On Wed, Dec 7, 2016 at 5:44 PM, Ulrich Hecht
> >> <ulrich.hecht+renesas@gmail.com> wrote:
> >> > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> >> > ---
> >> >  arch/arm64/boot/dts/renesas/r8a7796.dtsi | 13 +++++++++++++
> >> >  1 file changed, 13 insertions(+)
> >> >
> >> > diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> >> > index c5f0df5..782063a 100644
> >> > --- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> >> > +++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> >> > @@ -430,6 +430,9 @@
> >> >                                  <&cpg CPG_CORE R8A7796_CLK_S3D1>,
> >> >                                  <&scif_clk>;
> >> >                         clock-names = "fck", "brg_int", "scif_clk";
> >> > +                       dmas = <&dmac1 0x51>, <&dmac1 0x50>,
> >> > +                              <&dmac2 0x51>, <&dmac2 0x50>;
> >> > +                       dma-names = "tx", "rx", "tx", "rx";
> >> >                         power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
> >> >                         status = "disabled";
> >>
> >> Apparently the DMA properties were added to the HSCIF nodes instead
> >> of the SCIF nodes while applying this patch?
> >>
> >> 3 lines of context is not sufficient to distinguish between the various SCIF
> >> and HSCIF nodes :-(
> >
> > Thanks, I have updated renesas-devel accordingly.
> >
> > I notice in renesas-devel there seems to be one "tx", "rx" DMA per SCIF
> > rather than two added in Ulrich's patch. Is there a reason for that?
> 
> You mean renesas-drivers?

Yes.

> Oops, looks like I cherry-picked an older version of the patch, and failed to
> notice after reverting your wrong version
> (perhaps the final version was never part of a pull request from Uli?).
> 
> BTW, your version  is wrong, too: the second pair of DMA channels
> should point to dmac2, not dmac1, e.g.:
> 
>                   scif0: serial@e6e60000 {
>                           compatible = "renesas,scif-r8a7796",
>                                        "renesas,rcar-gen3-scif", "renesas,scif";
>                           reg = <0 0xe6e60000 0 64>;
>                           interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
>                           clocks = <&cpg CPG_MOD 207>,
>                                    <&cpg CPG_CORE R8A7796_CLK_S3D1>,
>                                    <&scif_clk>;
>                           clock-names = "fck", "brg_int", "scif_clk";
>   +                       dmas = <&dmac1 0x51>, <&dmac1 0x50>,
> - +                              <&dmac1 0x51>, <&dmac1 0x50>;
> + +                              <&dmac2 0x51>, <&dmac2 0x50>;
> 
>   +                       dma-names = "tx", "rx", "tx", "rx";
>                           power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
>                           status = "disabled";
>                   };

Thanks for noticing. I plan to squash the following incremental change into
the relevant commit. Hopefully that will be the end of this saga.

diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index 84ecd4248fae..951e351ddae1 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -569,7 +569,7 @@
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
 			dmas = <&dmac1 0x51>, <&dmac1 0x50>,
-			       <&dmac1 0x51>, <&dmac1 0x50>;
+			       <&dmac2 0x51>, <&dmac2 0x50>;
 			dma-names = "tx", "rx", "tx", "rx";
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
 			status = "disabled";
@@ -585,7 +585,7 @@
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
 			dmas = <&dmac1 0x53>, <&dmac1 0x52>,
-			       <&dmac1 0x53>, <&dmac1 0x52>;
+			       <&dmac2 0x53>, <&dmac2 0x52>;
 			dma-names = "tx", "rx", "tx", "rx";
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
 			status = "disabled";
@@ -644,7 +644,7 @@
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
 			dmas = <&dmac1 0x5b>, <&dmac1 0x5a>,
-			       <&dmac1 0x5b>, <&dmac1 0x5a>;
+			       <&dmac2 0x5b>, <&dmac2 0x5a>;
 			dma-names = "tx", "rx", "tx", "rx";
 			power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
 			status = "disabled";

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

end of thread, other threads:[~2017-03-06  8:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-07 16:44 [PATCH v2 0/3] r8a7796 SCIF integration Ulrich Hecht
2016-12-07 16:44 ` [PATCH v2 1/3] clk: renesas: r8a7796: Add SCIF clocks Ulrich Hecht
2016-12-09  9:12   ` Geert Uytterhoeven
2016-12-07 16:44 ` [PATCH v2 2/3] arm64: renesas: r8a7796: Add all SCIF nodes Ulrich Hecht
2016-12-08  9:06   ` Sergei Shtylyov
2016-12-07 16:44 ` [PATCH v2 3/3] arm64: renesas: r8a7796: Enable SCIF DMA Ulrich Hecht
2016-12-09  9:38   ` Geert Uytterhoeven
2017-02-21 14:27   ` Geert Uytterhoeven
2017-03-02 14:36     ` Simon Horman
2017-03-03  9:54       ` Geert Uytterhoeven
2017-03-06  8:44         ` Simon Horman
2016-12-08 13:34 ` [PATCH v2 0/3] r8a7796 SCIF integration Simon Horman
2016-12-09  9:42 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox