aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/file-size.sh
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2020-02-28 14:31:07 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-07 09:52:02 +0100
commitf93bf75891147602d55b90937628157cc13dbdb8 (patch)
tree589d8819dea4e0c45f877ac3cf2be207d1a22415 /scripts/file-size.sh
parent058bc104f7ca5c83d81695ee96f03dbd93bae518 (diff)
downloadkernel_replicant_linux-f93bf75891147602d55b90937628157cc13dbdb8.tar.gz
kernel_replicant_linux-f93bf75891147602d55b90937628157cc13dbdb8.tar.bz2
kernel_replicant_linux-f93bf75891147602d55b90937628157cc13dbdb8.zip
serial: 8250_bcm2835aux: Support rs485 software emulation
Amend 8250_bcm2835aux.c to support rs485 as introduced for 8250_omap.c by commit e490c9144cfa ("tty: Add software emulated RS485 support for 8250"). The bcm2835aux differs from omap chips by inverting the meaning of RTS in the MCR register: If the bit is clear, RTS is high. With omap, it's apparently the other way round. Moreover, omap achieves half-duplex mode by disabling the UART_IER_RDI interrupt and clearing the RX FIFO when TX stops. This approach doesn't work on bcm2835aux because the UART_LSR_DR bit is set even when UART_IER_RDI is disabled. Consequently, serial8250_handle_irq() invokes serial8250_rx_chars() to empty the FIFO and characters are received even though the user requested half-duplex. Solve by disabling the receiver using the non-standard CNTL register. Cache that register in the driver's private data for performance. Set the private data pointer before calling serial8250_register_8250_port() to prevent a null pointer deref in case one of the rs485 callbacks is invoked immediately after port registration. Signed-off-by: Lukas Wunner <lukas@wunner.de> Cc: Matwey V. Kornilov <matwey@sai.msu.ru> Link: https://lore.kernel.org/r/dd86460e20a8f979b7272a0bde73640312b902b1.1582895077.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/file-size.sh')
0 files changed, 0 insertions, 0 deletions