Skip to contentSkip to conversation

serial: lpuart: Fix RX FIFO Enable bitmask

PATCH In review Emanuele Ghidoli 4 participants 4 messages May 28 – Jun 11

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: lpuart: Fix RX FIFO Enable bitmask

From: Emanuele Ghidoli <[email protected]>

The Receive FIFO Enable (RXFE) field in the LPUART FIFO register is bit 3 on all supported architectures. The define has been wrong since it was introduced: for non-i.MX8/i.MXRT it set bit 6, which on LS102xA is read-only-as-zero, so the bug went unnoticed.

NXP confirmed bit 3 is correct everywhere, so drop the ARCH-based selection.

---
 drivers/serial/serial_lpuart.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/serial/serial_lpuart.c +0 -4
index 9fdb6503085d..3f5fadfc80a5 100644
@@ -53,11 +53,7 @@
 #define FIFO_RXSIZE_MASK	0x7
 #define FIFO_RXSIZE_OFF	0
 #define FIFO_TXFE		0x80
-#if defined(CONFIG_ARCH_IMX8) || defined(CONFIG_ARCH_IMXRT)
 #define FIFO_RXFE		0x08
-#else
-#define FIFO_RXFE		0x40
-#endif
 
 #define WATER_TXWATER_OFF	0
 #define WATER_RXWATER_OFF	16
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Emanuele Ghidoli

From: Emanuele Ghidoli <[email protected]>

The Receive FIFO Enable (RXFE) field in the LPUART FIFO register is bit 3 on all supported architectures. The define has been wrong since it was introduced: for non-i.MX8/i.MXRT it set bit 6, which on LS102xA is read-only-as-zero, so the bug went unnoticed.

Quoted 7 lines

NXP confirmed bit 3 is correct everywhere, so drop the ARCH-based selection.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Emanuele Ghidoli
Quoted 7 lines · Emanuele Ghidoli

From: Emanuele Ghidoli <[email protected]>

The Receive FIFO Enable (RXFE) field in the LPUART FIFO register is bit 3 on all supported architectures. The define has been wrong since it was introduced: for non-i.MX8/i.MXRT it set bit 6, which on LS102xA is read-only-as-zero, so the bug went unnoticed.

Quoted 7 lines

NXP confirmed bit 3 is correct everywhere, so drop the ARCH-based selection.

Signature · 2 lines
Sébastien Szymanski, Armadeus Systems
Software engineer
#3 lore raw
In reply to Emanuele Ghidoli
Quoted 9 lines · Emanuele Ghidoli

The Receive FIFO Enable (RXFE) field in the LPUART FIFO register is bit 3 on all supported architectures. The define has been wrong since it was introduced: for non-i.MX8/i.MXRT it set bit 6, which on LS102xA is read-only-as-zero, so the bug went unnoticed.

NXP confirmed bit 3 is correct everywhere, so drop the ARCH-based selection.

[...]

Applied to u-boot/next, thanks!

[1/1] serial: lpuart: Fix RX FIFO Enable bitmask

      commit: e65a87e959166e250a486b67ca23270272741643
Signature · 1 line
Tom