Message ID | 20211221071634.25980-3-yu.tu@amlogic.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | the UART driver compatible with the Amlogic Meson S4 SoC | expand |
On Tue, Dec 21, 2021 at 03:16:33PM +0800, Yu Tu wrote: > The meson_uart_shutdown function should have the opposite operation to > the meson_uart_startup function, so the shutdown of AML_UART_TX_EN is > logically missing. > > Signed-off-by: Yu Tu <yu.tu@amlogic.com> What commit does this fix? Should it go to stable kernels? Please put that in here if needed. thanks, greg k-h
On 2021/12/21 15:32, Greg Kroah-Hartman wrote: > [ EXTERNAL EMAIL ] > > On Tue, Dec 21, 2021 at 03:16:33PM +0800, Yu Tu wrote: >> The meson_uart_shutdown function should have the opposite operation to >> the meson_uart_startup function, so the shutdown of AML_UART_TX_EN is >> logically missing. >> >> Signed-off-by: Yu Tu <yu.tu@amlogic.com> > > What commit does this fix? Should it go to stable kernels? Please put > that in here if needed. > It has not yet been revealed that this is a bug. The reason I changed it was because I thought it was an improvement and it might be a hidden bug.The AML_UART_TX_EN bit is conspicuously missing when comparing the meson_uart_shutdown and meson_uart_startup functions.So I think it's best to add. > thanks, > > greg k-h >
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 02fafb8229d2..69450a461c48 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -126,8 +126,7 @@ static void meson_uart_shutdown(struct uart_port *port) spin_lock_irqsave(&port->lock, flags); val = readl(port->membase + AML_UART_CONTROL); - val &= ~AML_UART_RX_EN; - val &= ~(AML_UART_RX_INT_EN | AML_UART_TX_INT_EN); + val &= ~(AML_UART_RX_EN | AML_UART_TX_EN); writel(val, port->membase + AML_UART_CONTROL); spin_unlock_irqrestore(&port->lock, flags);
The meson_uart_shutdown function should have the opposite operation to the meson_uart_startup function, so the shutdown of AML_UART_TX_EN is logically missing. Signed-off-by: Yu Tu <yu.tu@amlogic.com> --- drivers/tty/serial/meson_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)