mbox series

[v4,0/9] serial: 8250: dw: RZN1 DMA support

Message ID 20220330132038.808679-1-miquel.raynal@bootlin.com (mailing list archive)
Headers show
Series serial: 8250: dw: RZN1 DMA support | expand

Message

Miquel Raynal March 30, 2022, 1:20 p.m. UTC
Hello,

Support for the RZN1 DMA engine allows us adapt a little bit the 8250 DW
UART driver with to bring DMA support for this SoC.

This short series applies on top of the series bringing RZN1 DMA
support, currently on its v5, see [1]. Technically speaking, only the DT
patch needs to be applied after [1]. The other patches can come in at
any moment, because if no "dmas" property is provided in the DT, DMA
support will simply be ignored.

[1] https://lore.kernel.org/dmaengine/20220315191255.221473-1-miquel.raynal@bootlin.com/T/#m0ef3323abce3eec961e142bf2fb35e95b9045fc5

Thanks,
Miquèl

Changes in v4:
* Squashed the patch changing the quirks type with the patch introducing
  the pdata structure. This way I don't need to go through the uintptr_t
  step. 
* Added a pdata stub to the DW compatible. This way "if (pdata)" checks
  are no longer needed and we can avoid ternary operators disliked by
  Greg.
* Saved the pdata structure pointer inside the per-device structure to
  avoid calling the same device property heplper over and over again. 
* Changed the style a bit to fit Andy's requirements.

Changes in v3:
* Added Geert's Reviewed-by's.
* Used forward declaration in dwlib.h when relevant.
* Reordered the headers when necessary.
* Added a patch changing the quirks type from unsigned long to unsigned
  int as advised by Andy.
* s/up->port.dev/p->dev/ when relevant.
* Added a debug message in dwlib when no CPR is available.
* Dropped the CPR_DMA_EXTRA bit addition: we assume DMA is there.
* Changed the prefix of certain definitions.

Changes in v2:
* Rebased on top of Emil's patches. Added platform data structures
  instead of raw quirk integers in order to provide a CPR value.
* Added includes in dwlib.h even though it's not particularly useful, it
  may help preventing a build error later on if we ever decide to include
  this file from another location.
* Dropped the call to ->tx_dma and instead implemented a callback that
  can be called from serial8250_tx/rx_dma.
* Used the device API instead of the of API.
* Changed the logic about DMA capabilities to avoid breaking existing
  designs.
* Introduced a new quirk related to the flow-control feature of the
  RZ/N1 version of the UART controller when used with DMA.
* Re-arranged the entire series as advised by Andy and Geert.
* Added several preparation patches to ease the review of various
  functional changes.

Miquel Raynal (6):
  serial: 8250: dw: Use the device API
  serial: 8250: dw: Create a more generic platform data structure
  serial: 8250: dw: Allow to use a fallback CPR value if not synthesized
  serial: 8250: dma: Allow driver operations before starting DMA
    transfers
  serial: 8250: dw: Introduce an rx_timeout variable in the IRQ path
  ARM: dts: r9a06g032: Fill the UART DMA properties

Phil Edworthy (3):
  serial: 8250: dw: Move definitions to the shared header
  serial: 8250: dw: Add support for DMA flow controlling devices
  serial: 8250: dw: Improve RZN1 support

 arch/arm/boot/dts/r9a06g032.dtsi     |  15 ++++
 drivers/tty/serial/8250/8250.h       |  18 ++++
 drivers/tty/serial/8250/8250_dma.c   |   4 +
 drivers/tty/serial/8250/8250_dw.c    | 123 ++++++++++++++++++++-------
 drivers/tty/serial/8250/8250_dwlib.c |  12 ++-
 drivers/tty/serial/8250/8250_dwlib.h |  32 +++++++
 6 files changed, 172 insertions(+), 32 deletions(-)

Comments

Andy Shevchenko March 30, 2022, 2:13 p.m. UTC | #1
On Wed, Mar 30, 2022 at 03:20:29PM +0200, Miquel Raynal wrote:
> Hello,
> 
> Support for the RZN1 DMA engine allows us adapt a little bit the 8250 DW
> UART driver with to bring DMA support for this SoC.
> 
> This short series applies on top of the series bringing RZN1 DMA
> support, currently on its v5, see [1]. Technically speaking, only the DT
> patch needs to be applied after [1]. The other patches can come in at
> any moment, because if no "dmas" property is provided in the DT, DMA
> support will simply be ignored.
> 
> [1] https://lore.kernel.org/dmaengine/20220315191255.221473-1-miquel.raynal@bootlin.com/T/#m0ef3323abce3eec961e142bf2fb35e95b9045fc5

Couple of versions ago I have asked you to Cc the series to Ilpo (Cc'ed).
I hope you will not forget it in v5.
Miquel Raynal April 4, 2022, 2:20 p.m. UTC | #2
Hello,

andriy.shevchenko@linux.intel.com wrote on Wed, 30 Mar 2022 17:13:16
+0300:

> On Wed, Mar 30, 2022 at 03:20:29PM +0200, Miquel Raynal wrote:
> > Hello,
> > 
> > Support for the RZN1 DMA engine allows us adapt a little bit the 8250 DW
> > UART driver with to bring DMA support for this SoC.
> > 
> > This short series applies on top of the series bringing RZN1 DMA
> > support, currently on its v5, see [1]. Technically speaking, only the DT
> > patch needs to be applied after [1]. The other patches can come in at
> > any moment, because if no "dmas" property is provided in the DT, DMA
> > support will simply be ignored.
> > 
> > [1] https://lore.kernel.org/dmaengine/20220315191255.221473-1-miquel.raynal@bootlin.com/T/#m0ef3323abce3eec961e142bf2fb35e95b9045fc5  
> 
> Couple of versions ago I have asked you to Cc the series to Ilpo (Cc'ed).
> I hope you will not forget it in v5.

Sorry I forgot to re-add manually Ilpo in the recipients.

Anyway, if Ilpo really needs to be Cc'ed, then there is something to do
on MAINTAINER's side.

Thanks,
Miquèl
Ilpo Järvinen April 4, 2022, 2:39 p.m. UTC | #3
On Mon, 4 Apr 2022, Miquel Raynal wrote:

> Hello,
> 
> andriy.shevchenko@linux.intel.com wrote on Wed, 30 Mar 2022 17:13:16
> +0300:
> 
> > On Wed, Mar 30, 2022 at 03:20:29PM +0200, Miquel Raynal wrote:
> > > Hello,
> > > 
> > > Support for the RZN1 DMA engine allows us adapt a little bit the 8250 DW
> > > UART driver with to bring DMA support for this SoC.
> > > 
> > > This short series applies on top of the series bringing RZN1 DMA
> > > support, currently on its v5, see [1]. Technically speaking, only the DT
> > > patch needs to be applied after [1]. The other patches can come in at
> > > any moment, because if no "dmas" property is provided in the DT, DMA
> > > support will simply be ignored.
> > > 
> > > [1] https://lore.kernel.org/dmaengine/20220315191255.221473-1-miquel.raynal@bootlin.com/T/#m0ef3323abce3eec961e142bf2fb35e95b9045fc5  
> > 
> > Couple of versions ago I have asked you to Cc the series to Ilpo (Cc'ed).
> > I hope you will not forget it in v5.
> 
> Sorry I forgot to re-add manually Ilpo in the recipients.
> 
> Anyway, if Ilpo really needs to be Cc'ed, then there is something to do
> on MAINTAINER's side.

While I'm considering doing like you suggest, I don't think it can be in 
general said that people who you're specificially told to Cc would be ok 
to get dropped unless they're among the listed maintainers.