serial: ns16550: Support run-time configuration
authorSimon Glass <sjg@chromium.org>
Fri, 20 Dec 2019 00:58:18 +0000 (17:58 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 3 Feb 2020 17:19:13 +0000 (01:19 +0800)
commit62cbde4c4e462e5147d07cf1424492bb39e7bf94
tree2faa4e220f1f8102f815c99eb573073484cc68d0
parent31a790bee939e227dfc7e6a6a323b2b13180707f
serial: ns16550: Support run-time configuration

At present this driver uses an assortment of CONFIG options to control
how it accesses the hardware. This is painful for platforms that are
supposed to be controlled by a device tree or a previous-stage bootloader.

Add a new CONFIG option to enable fully dynamic configuration. This
controls register spacing, size, offset and endianness.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Aiden Park <aiden.park@intel.com>
Tested-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: squashed in http://patchwork.ozlabs.org/patch/1232929/]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
drivers/serial/Kconfig
drivers/serial/ns16550.c
include/ns16550.h