serial: 8250_dw: add fractional divisor support
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>
Thu, 12 Jul 2018 01:59:40 +0000 (09:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jul 2018 15:07:26 +0000 (17:07 +0200)
commit701c5e73b296f93e3d07af663f354e859be4f1f7
tree152431f209d951bfa387291087d7f1597d97a564
parent6226e5f31a786b58f33781852c897ac32a325ce6
serial: 8250_dw: add fractional divisor support

For Synopsys DesignWare 8250 uart which version >= 4.00a, there's a
valid divisor latch fraction register. The fractional divisor width is
4bits ~ 6bits.

Now the preparation is done, it's easy to add the feature support.
This patch firstly tries to get the fractional divisor width during
probe, then setups dw specific get_divisor() and set_divisor() hook.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dw.c