diff mbox

[v2,3/3] arm64: renesas: r8a7796: Enable SCIF DMA

Message ID 1481129067-21949-4-git-send-email-ulrich.hecht+renesas@gmail.com (mailing list archive)
State Accepted
Commit b3d1f63687a0174ecbc49d981b8d872356829370
Headers show

Commit Message

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

Comments

Geert Uytterhoeven Dec. 9, 2016, 9:38 a.m. UTC | #1
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
Geert Uytterhoeven Feb. 21, 2017, 2:27 p.m. UTC | #2
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
Simon Horman March 2, 2017, 2:36 p.m. UTC | #3
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?
Geert Uytterhoeven March 3, 2017, 9:54 a.m. UTC | #4
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
diff mbox

Patch

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";
 		};