* [PATCH] serial: xilinx_uartps: unset STOPBRK when setting STARTBRK
@ 2023-06-24 21:03 Julien Malik
2023-10-12 7:40 ` Julien MALIK - UNSEENLABS
0 siblings, 1 reply; 3+ messages in thread
From: Julien Malik @ 2023-06-24 21:03 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-serial, Julien Malik
Zynq UG585 states, in chapter B.33, for XUARTPS_CR_STARTBRK:
It can only be set if STPBRK (Stop transmitter break) is not high
This fixes tcsendbreak, which otherwise does not actually break.
Signed-Off-By: Julien Malik <julien.malik@unseenlabs.fr>
---
drivers/tty/serial/xilinx_uartps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 8e521c69a959..2e69fceaa792 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -657,7 +657,7 @@ static void cdns_uart_break_ctl(struct uart_port *port, int ctl)
status = readl(port->membase + CDNS_UART_CR);
if (ctl == -1)
- writel(CDNS_UART_CR_STARTBRK | status,
+ writel(CDNS_UART_CR_STARTBRK | (~CDNS_UART_CR_STOPBRK & status),
port->membase + CDNS_UART_CR);
else {
if ((status & CDNS_UART_CR_STOPBRK) == 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: xilinx_uartps: unset STOPBRK when setting STARTBRK
2023-06-24 21:03 [PATCH] serial: xilinx_uartps: unset STOPBRK when setting STARTBRK Julien Malik
@ 2023-10-12 7:40 ` Julien MALIK - UNSEENLABS
2023-10-12 10:39 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Julien MALIK - UNSEENLABS @ 2023-10-12 7:40 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-serial@vger.kernel.org
Le 24/06/2023 à 23:03, Julien Malik a écrit :
> Zynq UG585 states, in chapter B.33, for XUARTPS_CR_STARTBRK:
> It can only be set if STPBRK (Stop transmitter break) is not high
>
> This fixes tcsendbreak, which otherwise does not actually break.
>
> Signed-Off-By: Julien Malik <julien.malik@unseenlabs.fr>
> ---
> drivers/tty/serial/xilinx_uartps.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
> index 8e521c69a959..2e69fceaa792 100644
> --- a/drivers/tty/serial/xilinx_uartps.c
> +++ b/drivers/tty/serial/xilinx_uartps.c
> @@ -657,7 +657,7 @@ static void cdns_uart_break_ctl(struct uart_port *port, int ctl)
> status = readl(port->membase + CDNS_UART_CR);
>
> if (ctl == -1)
> - writel(CDNS_UART_CR_STARTBRK | status,
> + writel(CDNS_UART_CR_STARTBRK | (~CDNS_UART_CR_STOPBRK & status),
> port->membase + CDNS_UART_CR);
> else {
> if ((status & CDNS_UART_CR_STOPBRK) == 0)
Dear reviewers,
This is a kind ping to attract more attention to this small patch.
The issue and corresponding fix has already been suggested back in 2016
on the xilinx forum [1].
This is my very first patch submission to the kernel.
Though I did my best, maybe I did not follow best practices, in which
case I'm all ears to suggestions.
Best regards,
Julien
[1]
https://support.xilinx.com/s/question/0D52E00006hpUSKSA2/cannot-send-serial-line-break-in-linux-380-trd-145
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: xilinx_uartps: unset STOPBRK when setting STARTBRK
2023-10-12 7:40 ` Julien MALIK - UNSEENLABS
@ 2023-10-12 10:39 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2023-10-12 10:39 UTC (permalink / raw)
To: Julien MALIK - UNSEENLABS; +Cc: linux-serial@vger.kernel.org
On Thu, Oct 12, 2023 at 07:40:16AM +0000, Julien MALIK - UNSEENLABS wrote:
> Le 24/06/2023 à 23:03, Julien Malik a écrit :
> > Zynq UG585 states, in chapter B.33, for XUARTPS_CR_STARTBRK:
> > It can only be set if STPBRK (Stop transmitter break) is not high
> >
> > This fixes tcsendbreak, which otherwise does not actually break.
> >
> > Signed-Off-By: Julien Malik <julien.malik@unseenlabs.fr>
> > ---
> > drivers/tty/serial/xilinx_uartps.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
> > index 8e521c69a959..2e69fceaa792 100644
> > --- a/drivers/tty/serial/xilinx_uartps.c
> > +++ b/drivers/tty/serial/xilinx_uartps.c
> > @@ -657,7 +657,7 @@ static void cdns_uart_break_ctl(struct uart_port *port, int ctl)
> > status = readl(port->membase + CDNS_UART_CR);
> >
> > if (ctl == -1)
> > - writel(CDNS_UART_CR_STARTBRK | status,
> > + writel(CDNS_UART_CR_STARTBRK | (~CDNS_UART_CR_STOPBRK & status),
> > port->membase + CDNS_UART_CR);
> > else {
> > if ((status & CDNS_UART_CR_STOPBRK) == 0)
>
>
> Dear reviewers,
>
>
> This is a kind ping to attract more attention to this small patch.
>
>
> The issue and corresponding fix has already been suggested back in 2016
> on the xilinx forum [1].
>
>
> This is my very first patch submission to the kernel.
>
> Though I did my best, maybe I did not follow best practices, in which
> case I'm all ears to suggestions.
Odd, I don't see this in my queue anywhere, nor do I see any responses,
very sorry about that. I'll try to apply it later today.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-12 10:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-24 21:03 [PATCH] serial: xilinx_uartps: unset STOPBRK when setting STARTBRK Julien Malik
2023-10-12 7:40 ` Julien MALIK - UNSEENLABS
2023-10-12 10:39 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).