From: Crescent Hsieh <crescentcy.hsieh@moxa.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
FangpingFP.Cheng@moxa.com, Epson.Chiang@moxa.com,
Crescent Hsieh <crescentcy.hsieh@moxa.com>
Subject: [PATCH v2 00/15] serial: 8250: add Moxa MUEx50 PCIe board support
Date: Wed, 1 Jul 2026 11:41:13 +0800 [thread overview]
Message-ID: <20260701034128.218569-1-crescentcy.hsieh@moxa.com> (raw)
This series consolidates Moxa PCIe multiport serial board support under a
dedicated 8250_mxpcie driver and adds MUEx50 UART support needed by these
boards.
The first part splits the existing Moxa PCIe board handling out of
8250_pci into a separate driver while preserving the existing probe flow
and device IDs. The series then introduces the MUEx50 UART port type and
enables the board-specific UART setup, including enhanced mode and FIFO
trigger programming.
The driver adds hardware-assisted flow control support for MUEx50 UARTs,
including automatic RTS/CTS handling and XON/XOFF offload. It also adds a
custom IRQ path and uses the MUEx50 memory-mapped FIFO windows to improve
RX and TX data movement.
Later patches introduce per-port private state and defer
uart_write_wakeup() out of the interrupt-driven TX path. The driver also
supports switching the serial interface mode through the RS485
configuration path, covering RS232, RS422, and RS485 modes supported by
the boards.
The final part extends 8250 core callbacks where needed so low-level
drivers can override break control and rx_trig_bytes handling. The
8250_mxpcie driver uses these hooks to implement RS485 break handling via
MUEx50 features and to expose the MUEx50 programmable RX trigger level
through the generic rx_trig_bytes sysfs interface.
Changes in v2:
- [PATCH v1 01/15]
- Sort and trim 8250_mxpcie includes, add __counted_by(num_ports),
tidy switch fallbacks and loop counters, use pci_set_drvdata() /
pci_get_drvdata(), and add numbered review links.
- [PATCH v1 03/15]
- Document the repeated FIFO clear sequence and the TX FIFO
read/write pointer clock-domain issue, and declare the FIFO clear
loop counter inside the for loop.
- [PATCH v1 05/15]
- Replace open-coded uart port lock/unlock with
guard(uart_port_lock_irqsave) in throttle() and unthrottle(), and
remove the unused flags variable.
- [PATCH v1 09/15]
- Preserve __counted_by(num_ports) when converting the flexible
array from line[] to per-port port[] storage.
- [PATCH v1 10/15]
- Add per-port workqueue state in pahole-friendly member order.
- [PATCH v1 13/15]
- Use guard(uart_port_lock_irqsave), use serial_dl_write(up, 0)
instead of direct UART_DLL/UART_DLM writes, and avoid modifying
sfr inside the serial_out() argument.
- [PATCH v1 14/15]
- Move get_rxtrig/set_rxtrig near existing getter/setter callbacks
in struct uart_port and in the 8250_core.c callback copy path.
- [PATCH v1 15/15]
- Use named RX trigger constants, serial_port_in/out(), and aligned
get_rxtrig/set_rxtrig ordering in both the implementation and
probe callback assignment.
v1: https://lore.kernel.org/all/20260504084900.22380-1-crescentcy.hsieh@moxa.com/
Crescent Hsieh (15):
serial: 8250: split Moxa PCIe serial board support out of 8250_pci
serial: 8250: add Moxa MUEx50 UART port type
serial: 8250_mxpcie: enable enhanced mode and program FIFO trigger
levels
serial: 8250_mxpcie: enable automatic RTS/CTS flow control
serial: 8250_mxpcie: offload XON/XOFF flow control to MUEx50 hardware
serial: 8250_mxpcie: add custom handle_irq callback
serial: 8250_mxpcie: speed up RX using memory-mapped FIFO window
serial: 8250_mxpcie: speed up TX using memory-mapped FIFO window
serial: 8250_mxpcie: introduce per-port private data structure
serial: 8250_mxpcie: defer uart_write_wakeup() to workqueue
serial: 8250_mxpcie: support serial interface mode switching
serial: 8250: allow low-level drivers to override break control
serial: 8250_mxpcie: add break support for RS485 using MUEx50 features
serial: 8250: allow UART drivers to override rx_trig_bytes handling
serial: 8250_mxpcie: implement rx_trig_bytes callbacks via MUEx50 RTL
drivers/tty/serial/8250/8250_core.c | 6 +
drivers/tty/serial/8250/8250_mxpcie.c | 686 ++++++++++++++++++++++++++
drivers/tty/serial/8250/8250_pci.c | 208 +-------
drivers/tty/serial/8250/8250_port.c | 33 +-
drivers/tty/serial/8250/Kconfig | 11 +
drivers/tty/serial/8250/Makefile | 1 +
include/linux/serial_8250.h | 1 +
include/linux/serial_core.h | 3 +
include/uapi/linux/serial_core.h | 3 +
9 files changed, 744 insertions(+), 208 deletions(-)
create mode 100644 drivers/tty/serial/8250/8250_mxpcie.c
--
2.45.2
next reply other threads:[~2026-07-01 3:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 3:41 Crescent Hsieh [this message]
2026-07-01 3:41 ` [PATCH v2 01/15] serial: 8250: split Moxa PCIe serial board support out of 8250_pci Crescent Hsieh
2026-07-01 12:42 ` Andy Shevchenko
2026-07-01 3:41 ` [PATCH v2 02/15] serial: 8250: add Moxa MUEx50 UART port type Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 03/15] serial: 8250_mxpcie: enable enhanced mode and program FIFO trigger levels Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 04/15] serial: 8250_mxpcie: enable automatic RTS/CTS flow control Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 05/15] serial: 8250_mxpcie: offload XON/XOFF flow control to MUEx50 hardware Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 06/15] serial: 8250_mxpcie: add custom handle_irq callback Crescent Hsieh
2026-07-01 12:41 ` Andy Shevchenko
2026-07-01 3:41 ` [PATCH v2 07/15] serial: 8250_mxpcie: speed up RX using memory-mapped FIFO window Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 08/15] serial: 8250_mxpcie: speed up TX " Crescent Hsieh
2026-07-01 12:36 ` Andy Shevchenko
2026-07-01 3:41 ` [PATCH v2 09/15] serial: 8250_mxpcie: introduce per-port private data structure Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 10/15] serial: 8250_mxpcie: defer uart_write_wakeup() to workqueue Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 11/15] serial: 8250_mxpcie: support serial interface mode switching Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 12/15] serial: 8250: allow low-level drivers to override break control Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 13/15] serial: 8250_mxpcie: add break support for RS485 using MUEx50 features Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 14/15] serial: 8250: allow UART drivers to override rx_trig_bytes handling Crescent Hsieh
2026-07-01 3:41 ` [PATCH v2 15/15] serial: 8250_mxpcie: implement rx_trig_bytes callbacks via MUEx50 RTL Crescent Hsieh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260701034128.218569-1-crescentcy.hsieh@moxa.com \
--to=crescentcy.hsieh@moxa.com \
--cc=Epson.Chiang@moxa.com \
--cc=FangpingFP.Cheng@moxa.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox