summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMoteen Shah <m-shah@ti.com>2026-09-18 15:33:46 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-09-23 14:49:47 +0200
commit3f4e6289053c72a22f058ec60478daa9931fed53 (patch)
treeb04f81330d994900393cbe9ba8856ed728de5bda /drivers
parenta198cfbc91b0ad6d12aa2efa967bba322c66b18c (diff)
serial: 8250_dw: Add ti,tda54-uart quirk to skip empty FIFO read
dw8250_handle_irq() does a bogus RX read on RX_TIMEOUT with no data present, to avoid an interrupt storm. On the IP version used in TDA54, that interrupt storm no longer occurs, but reading an empty RX FIFO instead triggers a data abort. Add a DW_UART_QUIRK_SKIP_EMPTY_FIFO_READ quirk for ti,tda54-uart to skip that read and avoid the data abort. Signed-off-by: Udit Kumar <u-kumar1@ti.com> Signed-off-by: Moteen Shah <m-shah@ti.com> Link: https://patch.msgid.link/20260918100346.4044899-3-m-shah@ti.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/8250/8250_dw.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 964c268670ea..0ab558230370 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -51,6 +51,7 @@
#define DW_UART_QUIRK_APMC0D08 BIT(4)
#define DW_UART_QUIRK_CPR_VALUE BIT(5)
#define DW_UART_QUIRK_IER_KICK BIT(6)
+#define DW_UART_QUIRK_SKIP_EMPTY_FIFO_READ BIT(7)
/*
* Number of consecutive IIR_NO_INT interrupts required to trigger interrupt
@@ -436,7 +437,7 @@ static int dw8250_handle_irq(struct uart_port *p)
* This problem has only been observed so far when not in DMA mode
* so we limit the workaround only to non-DMA mode.
*/
- if (!up->dma && rx_timeout) {
+ if (!(quirks & DW_UART_QUIRK_SKIP_EMPTY_FIFO_READ) && !up->dma && rx_timeout) {
status = serial_lsr_in(up);
/*
@@ -895,6 +896,11 @@ static const struct dw8250_platform_data dw8250_ultrarisc_dp1000_data = {
.quirks = DW_UART_QUIRK_CPR_VALUE,
};
+static const struct dw8250_platform_data dw8250_tda54 = {
+ .usr_reg = DW_UART_USR,
+ .quirks = DW_UART_QUIRK_SKIP_EMPTY_FIFO_READ,
+};
+
static const struct of_device_id dw8250_of_match[] = {
{ .compatible = "snps,dw-apb-uart", .data = &dw8250_dw_apb },
{ .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data },
@@ -902,6 +908,7 @@ static const struct of_device_id dw8250_of_match[] = {
{ .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data },
{ .compatible = "sophgo,sg2044-uart", .data = &dw8250_skip_set_rate_data },
{ .compatible = "starfive,jh7100-uart", .data = &dw8250_skip_set_rate_data },
+ { .compatible = "ti,tda54-uart", .data = &dw8250_tda54 },
{ .compatible = "ultrarisc,dp1000-uart", .data = &dw8250_ultrarisc_dp1000_data },
{ /* Sentinel */ }
};