serial: add support for PCI NS16550 UARTs
This ports over the Linux v5.4 8250_pci driver. Unlike Linux, the
barebox ns16550 implementation provides less hooks for covering all the
quirky behavior of all the different 8250-"compatible" hardware blocks.

The barebox driver matches against all serial port the Linux driver does,
but for hardware with quirks that can't be expressed in the current barebox
n16550 API, the probe fails with -ENOSYS and an appropriate message
telling that the quirk handling is missing. This should make future
extension of the driver straight-forward.

Unlike the kernel variant of the driver, most ->exit quirk callbacks can
be dropped in barebox as they often disable IRQs, which we do in the
->init anyway.

This was tested with the EFI PCI driver on qemu with the options:

  -device pci-serial,chardev=cdev0 -chardev file,id=cdev0,path=COM

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent e28d922 commit 5451508c4ff5d8f1d0c115963508b2ca7120141a
@Ahmad Fatoum Ahmad Fatoum authored on 4 Dec 2019
Sascha Hauer committed on 9 Dec 2019
Showing 3 changed files
View
drivers/serial/Kconfig
View
drivers/serial/Makefile
View
drivers/serial/serial_ns16550_pci.c 0 → 100644
Too large (Show diff)