stm32-usart.c (9f77d19207a0e8ba814c8ceb22e90ce7cb2aef64) stm32-usart.c (3db1d52466dc11dca4e47ef12a6e6e97f846af62)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) Maxime Coquelin 2015
4 * Copyright (C) STMicroelectronics SA 2017
5 * Authors: Maxime Coquelin <mcoquelin.stm32@gmail.com>
6 * Gerald Baeza <gerald.baeza@foss.st.com>
7 * Erwan Le Ray <erwan.leray@foss.st.com>
8 *

--- 501 unchanged lines hidden (view full) ---

510 return IRQ_HANDLED;
511}
512
513static unsigned int stm32_usart_tx_empty(struct uart_port *port)
514{
515 struct stm32_port *stm32_port = to_stm32_port(port);
516 const struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
517
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) Maxime Coquelin 2015
4 * Copyright (C) STMicroelectronics SA 2017
5 * Authors: Maxime Coquelin <mcoquelin.stm32@gmail.com>
6 * Gerald Baeza <gerald.baeza@foss.st.com>
7 * Erwan Le Ray <erwan.leray@foss.st.com>
8 *

--- 501 unchanged lines hidden (view full) ---

510 return IRQ_HANDLED;
511}
512
513static unsigned int stm32_usart_tx_empty(struct uart_port *port)
514{
515 struct stm32_port *stm32_port = to_stm32_port(port);
516 const struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
517
518 return readl_relaxed(port->membase + ofs->isr) & USART_SR_TXE;
518 if (readl_relaxed(port->membase + ofs->isr) & USART_SR_TC)
519 return TIOCSER_TEMT;
520
521 return 0;
519}
520
521static void stm32_usart_set_mctrl(struct uart_port *port, unsigned int mctrl)
522{
523 struct stm32_port *stm32_port = to_stm32_port(port);
524 const struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
525
526 if ((mctrl & TIOCM_RTS) && (port->status & UPSTAT_AUTORTS))

--- 1093 unchanged lines hidden ---
522}
523
524static void stm32_usart_set_mctrl(struct uart_port *port, unsigned int mctrl)
525{
526 struct stm32_port *stm32_port = to_stm32_port(port);
527 const struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
528
529 if ((mctrl & TIOCM_RTS) && (port->status & UPSTAT_AUTORTS))

--- 1093 unchanged lines hidden ---