serial: sh-sci: Add support for SCIFA/SCIFB variable sampling rates
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 4 Jan 2016 13:45:22 +0000 (14:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 06:54:55 +0000 (22:54 -0800)
commit92a0574867f3329ca285b51adcf09ed3ee42e7a0
tree56cb0873c2787407212adffa3fb3e4d946caacc3
parent69eee8e9c876eb412282a3b45d998e989d3a8e93
serial: sh-sci: Add support for SCIFA/SCIFB variable sampling rates

Add support for sparse variable sampling rates on SCIFA and SCIFB.
According to the datasheet, sampling rate 1/5 needs a small quirk to
avoid corrupting the first byte received.

This increases the range and accuracy of supported baud rates.
E.g. on r8a7791/koelsch:
  - Supports now 134, 150, and standard 500000-4000000 bps,
  - Perfect match for 134, 150, 500000, 10000002000000, and 4000000
    bps,
  - Accuracy has increased for most standard bps values.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c