mbox series

[v11,0/9] RZN1 DMA support

Message ID 20220421085112.78858-1-miquel.raynal@bootlin.com (mailing list archive)
Headers show
Series RZN1 DMA support | expand

Message

Miquel Raynal April 21, 2022, 8:51 a.m. UTC
Hello,

This is the series bringing DMA support to RZN1 platforms.
Other series follow with eg. UART and RTC support as well.

There is no other conflicting dependency with the other series, so this
series can now entirely be merged in the dmaengine tree I believe.

Cheers,
Miquèl

Changes in v11:
* Renamed two defines.
* Changed the way the bitmap is declared.
* Updated the cover letter: this series can now go in through the
  dmaengine tree.

Changes in v10:
* Collected more tags.
* Dropped the mutex from the dmamux driver.
* Added missing includes in the dmamux driver.
* Replaced set_bit() by test_and_set_bit() in order to check if the chan
  is already used or not in the dmamux driver.
* Corrected the misuse of the set_bit() macro in the dmamux driver.

Changes in v9:
* Collected more tags.
* Changed a u32 into a regular bitmap and used the bitmap API.
* Reordered two function calls to save one extra line.
* Added a define to avoid a magic value.

Changes in v8:
* Collected more tags.
* Moved the Makefile line adding the dmamux driver to the bottom of the
  file.
* Reversed the logic in a ternary operation as suggested by Andy.
* Changed a bit the naming of a #define as suggested by Andy.

Changes in v7:
* This time, really added Stephen's Acks (sorry for the error).
* Moved an error check to get rid of one mutex_unlock/lock call as
  suggested by Ilpo.
* Split the patch adding the dmamux driver as advised by Vinod. One
  patch introduces the dmamux driver, the other populates the children
  of the system controller. As the original patch got acked by Stephen
  Boyd, I moved his tag to the patch touching the clock controller only.

Changes in v6:
* Added Stephen's acks.
* Fixed an extra newline added in the middle of nowhere.
* Rebased on top of v5.18-rc1.

Changes in v5:
* Used gotos in rzn1_dmamux_route_allocate().
* Changed the prefix to "dmaengine:".
* Dropped the partial transfers fix.
* Added Rob's acks.

Changes in v4:
* Freed "map" in the error path of the dmamux driver.
* Improved a bit the style as requested by Prabhakar.
* Dropped a __maybe_unused.
* Reorder the includes.
* Added a dependency on ARCH_RZN1.
* Added Rob's Ack.
* Added a reg property to the dmamux binding file.
* Referenced the dmamux binding from the system controller file.
* Called of_platform_populate from the end of the system controller
  (clock) driver probe in order to probe the dmamux if it was
  populated.
* Added DMA properties to all the relevant UARTs.

Changes in v3:
* Added Reviewed-by tags.
* Exported the set_dmamux* symbol properly.
* Dropped a useless check in the probe and moved the sysctrl_priv
  assignation to the end of the probe.
* Renamed the dmamux driver
* Added a couple of missing MODULE_ macros in the dmamux driver.
* Decided to use a regular platform init call instead of the
  arch_initcall() initially proposed.
* s/%d/%u/ in printk's when appropriate.
* Used a hardcoded value instead of dmamux->dmac_requests when
  appropriate.
* Changed the variable name "master" to "dmac_idx" to be more
  descriptive.
* Dropped most of the of_* calls in favor of #define's.
* Fixed a typo.
* Exported two symbols from 8250_dma.c.

Changes in v2:
* Clarified that the 'fix' regarding non aligned reads would only apply
  to the DEV_TO_MEM case.
* Fix the DMA controller compatible string (copy-paste error).
* s/syscon/sysctrl/ as advised by Geert.
* Disabled irqs when taking the spinlock from the clocks driver.
* Moved the DMAMUX offset inside the driver.
* Removed extra commas.
* Improved the style as suggested by Andy.
* Removed a dupplicated check against the device node presence.
* Reduced the number of lines of code by using dev_err_probe().
* Created a Kconfig symbol for DMAMUX to fix the two robot reports
  received and be sure there was no useless overhead with other
  platforms.
* Exported the serial8250_{tx,rx}_dma() symbols.

Miquel Raynal (9):
  dt-bindings: dmaengine: Introduce RZN1 dmamux bindings
  dt-bindings: clock: r9a06g032-sysctrl: Reference the DMAMUX subnode
  dt-bindings: dmaengine: Introduce RZN1 DMA compatible
  soc: renesas: rzn1-sysc: Export function to set dmamux
  dmaengine: dw: dmamux: Introduce RZN1 DMA router support
  clk: renesas: r9a06g032: Probe possible children
  dmaengine: dw: Add RZN1 compatible
  ARM: dts: r9a06g032: Add the two DMA nodes
  ARM: dts: r9a06g032: Describe the DMA router

 .../clock/renesas,r9a06g032-sysctrl.yaml      |  11 ++
 .../bindings/dma/renesas,rzn1-dmamux.yaml     |  51 ++++++
 .../bindings/dma/snps,dma-spear1340.yaml      |   8 +-
 MAINTAINERS                                   |   1 +
 arch/arm/boot/dts/r9a06g032.dtsi              |  40 +++++
 drivers/clk/renesas/r9a06g032-clocks.c        |  36 +++-
 drivers/dma/dw/Kconfig                        |   9 +
 drivers/dma/dw/Makefile                       |   2 +
 drivers/dma/dw/platform.c                     |   1 +
 drivers/dma/dw/rzn1-dmamux.c                  | 155 ++++++++++++++++++
 include/linux/soc/renesas/r9a06g032-sysctrl.h |  11 ++
 11 files changed, 323 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/dma/renesas,rzn1-dmamux.yaml
 create mode 100644 drivers/dma/dw/rzn1-dmamux.c
 create mode 100644 include/linux/soc/renesas/r9a06g032-sysctrl.h

Comments

Geert Uytterhoeven April 25, 2022, 4:05 p.m. UTC | #1
Hi Miquel,

On Thu, Apr 21, 2022 at 10:51 AM Miquel Raynal
<miquel.raynal@bootlin.com> wrote:
> This is the series bringing DMA support to RZN1 platforms.
> Other series follow with eg. UART and RTC support as well.

Thanks for your series!

> There is no other conflicting dependency with the other series, so this
> series can now entirely be merged in the dmaengine tree I believe.
>
> Changes in v11:
> * Renamed two defines.
> * Changed the way the bitmap is declared.
> * Updated the cover letter: this series can now go in through the
>   dmaengine tree.

/me confused

> Miquel Raynal (9):
>   dt-bindings: dmaengine: Introduce RZN1 dmamux bindings
>   dt-bindings: clock: r9a06g032-sysctrl: Reference the DMAMUX subnode
>   dt-bindings: dmaengine: Introduce RZN1 DMA compatible
>   soc: renesas: rzn1-sysc: Export function to set dmamux
>   dmaengine: dw: dmamux: Introduce RZN1 DMA router support
>   clk: renesas: r9a06g032: Probe possible children
>   dmaengine: dw: Add RZN1 compatible
>   ARM: dts: r9a06g032: Add the two DMA nodes
>   ARM: dts: r9a06g032: Describe the DMA router

The last two DTS parts have to go in through the renesas-arm-dt and
soc trees.

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
Miquel Raynal April 26, 2022, 7:32 a.m. UTC | #2
Hi Geert,

geert@linux-m68k.org wrote on Mon, 25 Apr 2022 18:05:34 +0200:

> Hi Miquel,
> 
> On Thu, Apr 21, 2022 at 10:51 AM Miquel Raynal
> <miquel.raynal@bootlin.com> wrote:
> > This is the series bringing DMA support to RZN1 platforms.
> > Other series follow with eg. UART and RTC support as well.  
> 
> Thanks for your series!
> 
> > There is no other conflicting dependency with the other series, so this
> > series can now entirely be merged in the dmaengine tree I believe.
> >
> > Changes in v11:
> > * Renamed two defines.
> > * Changed the way the bitmap is declared.
> > * Updated the cover letter: this series can now go in through the
> >   dmaengine tree.  
> 
> /me confused
> 
> > Miquel Raynal (9):
> >   dt-bindings: dmaengine: Introduce RZN1 dmamux bindings
> >   dt-bindings: clock: r9a06g032-sysctrl: Reference the DMAMUX subnode
> >   dt-bindings: dmaengine: Introduce RZN1 DMA compatible
> >   soc: renesas: rzn1-sysc: Export function to set dmamux
> >   dmaengine: dw: dmamux: Introduce RZN1 DMA router support
> >   clk: renesas: r9a06g032: Probe possible children
> >   dmaengine: dw: Add RZN1 compatible
> >   ARM: dts: r9a06g032: Add the two DMA nodes
> >   ARM: dts: r9a06g032: Describe the DMA router  
> 
> The last two DTS parts have to go in through the renesas-arm-dt and
> soc trees.

Yes, DT usually never go in through subsystem trees anyway, of
course they should be taken in through the Renesas tree. For the other
patches I think its simpler if everything goes through the dmaengine
tree, but I'm fine either way, I'll let you discuss this with the DMA
folks if you disagree.

Thanks,
Miquèl
Geert Uytterhoeven April 27, 2022, 12:50 p.m. UTC | #3
Hi Miquel,

On Tue, Apr 26, 2022 at 9:32 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> geert@linux-m68k.org wrote on Mon, 25 Apr 2022 18:05:34 +0200:
> > On Thu, Apr 21, 2022 at 10:51 AM Miquel Raynal
> > <miquel.raynal@bootlin.com> wrote:
> > > This is the series bringing DMA support to RZN1 platforms.
> > > Other series follow with eg. UART and RTC support as well.
> >
> > Thanks for your series!
> >
> > > There is no other conflicting dependency with the other series, so this
> > > series can now entirely be merged in the dmaengine tree I believe.
> > >
> > > Changes in v11:
> > > * Renamed two defines.
> > > * Changed the way the bitmap is declared.
> > > * Updated the cover letter: this series can now go in through the
> > >   dmaengine tree.
> >
> > /me confused
> >
> > > Miquel Raynal (9):
> > >   dt-bindings: dmaengine: Introduce RZN1 dmamux bindings
> > >   dt-bindings: clock: r9a06g032-sysctrl: Reference the DMAMUX subnode
> > >   dt-bindings: dmaengine: Introduce RZN1 DMA compatible
> > >   soc: renesas: rzn1-sysc: Export function to set dmamux
> > >   dmaengine: dw: dmamux: Introduce RZN1 DMA router support
> > >   clk: renesas: r9a06g032: Probe possible children
> > >   dmaengine: dw: Add RZN1 compatible
> > >   ARM: dts: r9a06g032: Add the two DMA nodes
> > >   ARM: dts: r9a06g032: Describe the DMA router
> >
> > The last two DTS parts have to go in through the renesas-arm-dt and
> > soc trees.
>
> Yes, DT usually never go in through subsystem trees anyway, of
> course they should be taken in through the Renesas tree. For the other
> patches I think its simpler if everything goes through the dmaengine
> tree, but I'm fine either way, I'll let you discuss this with the DMA
> folks if you disagree.

Fine for me.  I've acked the renesas-clk related patches, so they
can go in through the dmaengine tree.

Thanks!

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
Miquel Raynal April 27, 2022, 3:45 p.m. UTC | #4
Hi Geert,

geert@linux-m68k.org wrote on Wed, 27 Apr 2022 14:50:43 +0200:

> Hi Miquel,
> 
> On Tue, Apr 26, 2022 at 9:32 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> > geert@linux-m68k.org wrote on Mon, 25 Apr 2022 18:05:34 +0200:  
> > > On Thu, Apr 21, 2022 at 10:51 AM Miquel Raynal
> > > <miquel.raynal@bootlin.com> wrote:  
> > > > This is the series bringing DMA support to RZN1 platforms.
> > > > Other series follow with eg. UART and RTC support as well.  
> > >
> > > Thanks for your series!
> > >  
> > > > There is no other conflicting dependency with the other series, so this
> > > > series can now entirely be merged in the dmaengine tree I believe.
> > > >
> > > > Changes in v11:
> > > > * Renamed two defines.
> > > > * Changed the way the bitmap is declared.
> > > > * Updated the cover letter: this series can now go in through the
> > > >   dmaengine tree.  
> > >
> > > /me confused
> > >  
> > > > Miquel Raynal (9):
> > > >   dt-bindings: dmaengine: Introduce RZN1 dmamux bindings
> > > >   dt-bindings: clock: r9a06g032-sysctrl: Reference the DMAMUX subnode
> > > >   dt-bindings: dmaengine: Introduce RZN1 DMA compatible
> > > >   soc: renesas: rzn1-sysc: Export function to set dmamux
> > > >   dmaengine: dw: dmamux: Introduce RZN1 DMA router support
> > > >   clk: renesas: r9a06g032: Probe possible children
> > > >   dmaengine: dw: Add RZN1 compatible
> > > >   ARM: dts: r9a06g032: Add the two DMA nodes
> > > >   ARM: dts: r9a06g032: Describe the DMA router  
> > >
> > > The last two DTS parts have to go in through the renesas-arm-dt and
> > > soc trees.  
> >
> > Yes, DT usually never go in through subsystem trees anyway, of
> > course they should be taken in through the Renesas tree. For the other
> > patches I think its simpler if everything goes through the dmaengine
> > tree, but I'm fine either way, I'll let you discuss this with the DMA
> > folks if you disagree.  
> 
> Fine for me.  I've acked the renesas-clk related patches, so they
> can go in through the dmaengine tree.

Perfect. Sounds like v12 is the right one \o/

Thanks for all the feedback you keep providing on all the RZ/N1
(correctly spelled this time;-) ) series.

Cheers,
Miquèl