2022-11-25 11:21:07

by Sherry Sun

[permalink] [raw]
Subject: [PATCH V3 0/3] fsl_lpuart: improve Idle Line Interrupt and registers handle in .shutdown()

---
Changes in V3:
1. Add the corresponding head files for GENMASK and FIELD_PREP to
avoid build break.
2. Remove the patch 2 and patch 3 in the original patch set, as the
loopback and RTS/CTS flags may not need to be cleared in .shutdown().
---

The patchset improve the Idle Line Interrupt for lpuart driver, also handle
the registers correctly for lpuart32 when closing the uart port.

Patches have been tested on imx8ulp-evk platform.

Sherry Sun (3):
tty: serial: fsl_lpuart: only enable Idle Line Interrupt for non-dma
case
tty: serial: fsl_lpuart: disable Rx/Tx DMA in lpuart32_shutdown()
tty: serial: fsl_lpuart: clear LPUART Status Register in
lpuart32_shutdown()

drivers/tty/serial/fsl_lpuart.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)

--
2.17.1


2022-11-25 11:23:44

by Sherry Sun

[permalink] [raw]
Subject: [PATCH V3 2/3] tty: serial: fsl_lpuart: disable Rx/Tx DMA in lpuart32_shutdown()

UARTBAUD_RDMAE and UARTBAUD_TDMAE are enabled in lpuart32_startup(), but
lpuart32_shutdown() not disable them, only free the dma ring buffer and
release the dma channels, so here disable the Rx/Tx DMA first in
lpuart32_shutdown().

Fixes: 42b68768e51b ("serial: fsl_lpuart: DMA support for 32-bit variant")
Signed-off-by: Sherry Sun <[email protected]>
---
drivers/tty/serial/fsl_lpuart.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 9b8d32262f1e..88697ddcd8c4 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1799,6 +1799,11 @@ static void lpuart32_shutdown(struct uart_port *port)

spin_lock_irqsave(&port->lock, flags);

+ /* disable Rx/Tx DMA */
+ temp = lpuart32_read(port, UARTBAUD);
+ temp &= ~(UARTBAUD_TDMAE | UARTBAUD_RDMAE);
+ lpuart32_write(port, temp, UARTBAUD);
+
/* disable Rx/Tx and interrupts */
temp = lpuart32_read(port, UARTCTRL);
temp &= ~(UARTCTRL_TE | UARTCTRL_RE | UARTCTRL_ILIE |
--
2.17.1

2022-12-14 02:53:09

by Sherry Sun

[permalink] [raw]
Subject: RE: [PATCH V3 0/3] fsl_lpuart: improve Idle Line Interrupt and registers handle in .shutdown()

Gentle ping for this patch set...

Best Regards
Sherry

> -----Original Message-----
> From: Sherry Sun
> Sent: 2022??11??25?? 18:24
> To: [email protected]; [email protected]
> Cc: [email protected]; [email protected]; dl-linux-imx
> <[email protected]>; [email protected];
> [email protected]
> Subject: [PATCH V3 0/3] fsl_lpuart: improve Idle Line Interrupt and registers
> handle in .shutdown()
>
> ---
> Changes in V3:
> 1. Add the corresponding head files for GENMASK and FIELD_PREP to avoid
> build break.
> 2. Remove the patch 2 and patch 3 in the original patch set, as the loopback
> and RTS/CTS flags may not need to be cleared in .shutdown().
> ---
>
> The patchset improve the Idle Line Interrupt for lpuart driver, also handle the
> registers correctly for lpuart32 when closing the uart port.
>
> Patches have been tested on imx8ulp-evk platform.
>
> Sherry Sun (3):
> tty: serial: fsl_lpuart: only enable Idle Line Interrupt for non-dma
> case
> tty: serial: fsl_lpuart: disable Rx/Tx DMA in lpuart32_shutdown()
> tty: serial: fsl_lpuart: clear LPUART Status Register in
> lpuart32_shutdown()
>
> drivers/tty/serial/fsl_lpuart.c | 22 +++++++++++++++++-----
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
> --
> 2.17.1

2022-12-14 08:49:16

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH V3 0/3] fsl_lpuart: improve Idle Line Interrupt and registers handle in .shutdown()

On Wed, Dec 14, 2022 at 02:43:16AM +0000, Sherry Sun wrote:
> Gentle ping for this patch set...

It's the middle of the merge window and we can not do anything until
6.2-rc1 is released, sorry.

thanks,

greg k-h

2022-12-14 09:00:55

by Sherry Sun

[permalink] [raw]
Subject: RE: [PATCH V3 0/3] fsl_lpuart: improve Idle Line Interrupt and registers handle in .shutdown()



> -----Original Message-----
> From: [email protected] <[email protected]>
> Sent: 2022??12??14?? 16:26
> To: Sherry Sun <[email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; dl-linux-imx <[email protected]>;
> [email protected]; [email protected]
> Subject: Re: [PATCH V3 0/3] fsl_lpuart: improve Idle Line Interrupt and
> registers handle in .shutdown()
>
> On Wed, Dec 14, 2022 at 02:43:16AM +0000, Sherry Sun wrote:
> > Gentle ping for this patch set...
>
> It's the middle of the merge window and we can not do anything until
> 6.2-rc1 is released, sorry.
>

Oh... okay, thanks for the info, sorry for the inconvenience.

Best Regards
Sherry


> thanks,
>
> greg k-h