ns16550: add Exar PCIe UART cards support
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Fri, 20 Aug 2021 10:29:45 +0000 (12:29 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 20 Aug 2021 10:29:45 +0000 (12:29 +0200)
commit5ffd37db2ff6fecfaee5bb2ebdaaff1cfb54b1a2
treed3a764988100f839923b454bef0172e47df0ebc6
parent3e1dea307b9bd03807f86e2265908039b2f9accf
ns16550: add Exar PCIe UART cards support

Besides standard UART setup, this device needs enabling
(vendor-specific) "Enhanced Control Bits" - otherwise disabling hardware
control flow (MCR[2]) is ignored. Add appropriate quirk to the
ns16550_setup_preirq(), similar to the handle_dw_usr_busy_quirk(). The
new function act on Exar 2-, 4-, and 8- port cards only. I have tested
the functionality on 2-port card but based on the Linux driver, the same
applies to other models too.

Additionally, Exar card supports fractional divisor (DLD[3:0] register,
at 0x02). This part is not supported here yet, and seems to not
be required for working 115200bps at the very least.

The specification for the 2-port card is available at:
https://www.maxlinear.com/product/interface/uarts/pcie-uarts/xr17v352

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/char/ns16550.c
xen/include/xen/8250-uart.h
xen/include/xen/pci_ids.h