[PATCH v1 00/31] serial: 8250: consolidate Moxa UPCI/PCIe support under 8250 drivers

Crescent Hsieh posted 31 patches 1 day, 10 hours ago
drivers/tty/Kconfig                   |   13 -
drivers/tty/Makefile                  |    1 -
drivers/tty/mxser.c                   | 1934 -------------------------
drivers/tty/serial/8250/8250_core.c   |   14 +
drivers/tty/serial/8250/8250_mxpcie.c | 1482 +++++++++++++++++++
drivers/tty/serial/8250/8250_mxupci.c |  495 +++++++
drivers/tty/serial/8250/8250_pci.c    |  205 ---
drivers/tty/serial/8250/8250_port.c   |   69 +-
drivers/tty/serial/8250/Kconfig       |   22 +
drivers/tty/serial/8250/Makefile      |    2 +
include/linux/serial_8250.h           |    1 +
include/linux/serial_core.h           |    4 +
include/uapi/linux/serial_core.h      |    6 +
13 files changed, 2090 insertions(+), 2158 deletions(-)
delete mode 100644 drivers/tty/mxser.c
create mode 100644 drivers/tty/serial/8250/8250_mxpcie.c
create mode 100644 drivers/tty/serial/8250/8250_mxupci.c
[PATCH v1 00/31] serial: 8250: consolidate Moxa UPCI/PCIe support under 8250 drivers
Posted by Crescent Hsieh 1 day, 10 hours ago
There are currently two separate drivers supporting Moxa UPCI/PCIe
multiport serial boards: the legacy mxser driver and partial support in
8250_pci.  This patch series consolidates these implementations into two
dedicated 8250-based drivers, 8250_mxupci and 8250_mxpcie, in order to
remove duplicated code, improve consistency, and simplify long-term
maintenance.

In addition to the driver migration, the series also introduces several
hardware-specific improvements for Moxa UPCI/PCIe devices, including:

 - reworked and optimized ISR-based Tx/Rx paths
 - per-port FIFO trigger level support
 - break control under RS-485 modes
 - CPLD/GPIO-based line control for PCIe boards: terminator, pull-state,
   and one-shot RS-485-2W auto-tune

These changes restore full hardware functionality while aligning both
device families with the upstream 8250 serial framework.

Crescent Hsieh (31):
  tty: mxser: serial: 8250: replace mxser with 8250-based driver
  serial: 8250: add MU860 UART configuration
  serial: 8250_mxupci: enable enhanced mode and custom FIFO trigger
    levels
  serial: 8250_mxupci: enable auto RTS/CTS flow control
  serial: 8250_mxupci: enable on-chip software flow control
  serial: 8250_mxupci: add custom handle_irq()
  serial: 8250_mxupci: add GDL-based Rx routine for 8250_mxupci
  serial: 8250_mxupci: add custom Tx routine for 8250_mxupci
  serial: 8250: split 8250_mxpcie from 8250_pci
  serial: 8250: add MUEx50 UART configuration
  serial: 8250_mxpcie: enable enhanced mode and custom FIFO trigger
    levels
  serial: 8250_mxpcie: enable auto RTS/CTS flow control
  serial: 8250_mxpcie: enable on-chip software flow control
  serial: 8250_mxpcie: add custom handle_irq()
  serial: 8250_mxpcie: optimize Rx using memory-mapped FIFO access
  serial: 8250_mxpcie: optimize Tx using memory-mapped FIFO access
  serial: 8250_mxpcie: enable serial interface switching
  serial: 8250: allow low-level driver to override break_ctl()
  serial: 8250_mxpcie: add break signal support under RS485
  serial: 8250: add optional callbacks for rx_trig_bytes
  serial: 8250_mxpcie: implement rx_trig_bytes callbacks and persist
    per-port level
  serial: 8250_mxupci: implement rx_trig_bytes callbacks and persist
    per-port level
  serial: 8250_mxpcie: defer uart_write_wakeup to workqueue
  serial: 8250_mxupci: defer uart_write_wakeup to workqueue
  serial: 8250_mxpcie: add basic GPIO helper functions
  serial: 8250_mxpcie: add basic CPLD helper functions
  serial: 8250: Allow dynamic extension of uart_port attr_group
  serial: 8250_mxpcie: Track current serial interface for later feature
    gating
  serial: 8250_mxpcie: Add sysfs to control terminator
  serial: 8250_mxpcie: Add sysfs to control pull state via CPLD
  serial: 8250_mxpcie: add RS485-2W auto-adjust sysfs control

 drivers/tty/Kconfig                   |   13 -
 drivers/tty/Makefile                  |    1 -
 drivers/tty/mxser.c                   | 1934 -------------------------
 drivers/tty/serial/8250/8250_core.c   |   14 +
 drivers/tty/serial/8250/8250_mxpcie.c | 1482 +++++++++++++++++++
 drivers/tty/serial/8250/8250_mxupci.c |  495 +++++++
 drivers/tty/serial/8250/8250_pci.c    |  205 ---
 drivers/tty/serial/8250/8250_port.c   |   69 +-
 drivers/tty/serial/8250/Kconfig       |   22 +
 drivers/tty/serial/8250/Makefile      |    2 +
 include/linux/serial_8250.h           |    1 +
 include/linux/serial_core.h           |    4 +
 include/uapi/linux/serial_core.h      |    6 +
 13 files changed, 2090 insertions(+), 2158 deletions(-)
 delete mode 100644 drivers/tty/mxser.c
 create mode 100644 drivers/tty/serial/8250/8250_mxpcie.c
 create mode 100644 drivers/tty/serial/8250/8250_mxupci.c

-- 
2.45.2