diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2015-01-22 20:24:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-02 21:11:27 +0300 |
commit | 06a4c710673184f5c750bdb2f8579e0ae1cc252c (patch) | |
tree | 31a5984b7badc4d0c144ce22d8a67082c53d0cfd /include/linux/serial_8250.h | |
parent | e72abd5da0730dfc4c8f566f7896c15c2d1bb88f (diff) | |
download | linux-06a4c710673184f5c750bdb2f8579e0ae1cc252c.tar.xz |
serial: 8250: Refactor XR17V35X divisor calculation
Exar XR17V35X PCIe uarts support a 4-bit fractional divisor register.
Refactor the divisor calculation from the divisor programming.
Allow a fractional result from serial8250_get_divisor() and pass this
result to serial8250_dl_write().
Simplify the calculation for quot and quot_frac. This was verified
to be identical to the results of the original calculation with a test
jig.
NB: The results were also compared with the divisor value chart
on pg 33 of the Exar XR17V352 datasheet, rev 1.0.3, here:
http://www.exar.com/common/content/document.ashx?id=1585
which differs from the calculated values by 1 in the fractional result.
This is because the calculated values are still rounded in the
fractional result, whereas the table values are truncated. Note
that the data error rate % values in the datasheet are for
rounded fractional results, as the truncated fractional results
have more error.
Cc: Joe Schultz <jschultz@xes-inc.com>
Cc: Aaron Sierra <asierra@xes-inc.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_8250.h')
0 files changed, 0 insertions, 0 deletions