aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serial_sci.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-12-06 04:59:12 -0500
committerSimon Horman <horms+renesas@verge.net.au>2013-12-23 21:17:33 -0500
commit6557b1f69ea0961efde7ab33bfe0cb7e3bfed54e (patch)
tree6b80f503c2968778ed6e0d7e20a1a7e34db1de50 /include/linux/serial_sci.h
parent6db201da2522d7dd231982ff7b83916cf4db3e41 (diff)
serial: sh-sci: Simplify baud rate calculation algorithms
Rewrite the baud rate register value calculations in easier to read forms. The computed value isn't modified. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'include/linux/serial_sci.h')
-rw-r--r--include/linux/serial_sci.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h
index babc5fe070b9..12cf50c1c047 100644
--- a/include/linux/serial_sci.h
+++ b/include/linux/serial_sci.h
@@ -11,10 +11,10 @@
11#define SCIx_NOT_SUPPORTED (-1) 11#define SCIx_NOT_SUPPORTED (-1)
12 12
13enum { 13enum {
14 SCBRR_ALGO_1, /* ((clk + 16 * bps) / (16 * bps) - 1) */ 14 SCBRR_ALGO_1, /* clk / (16 * bps) */
15 SCBRR_ALGO_2, /* ((clk + 16 * bps) / (32 * bps) - 1) */ 15 SCBRR_ALGO_2, /* DIV_ROUND_CLOSEST(clk, 32 * bps) - 1 */
16 SCBRR_ALGO_3, /* (((clk * 2) + 16 * bps) / (16 * bps) - 1) */ 16 SCBRR_ALGO_3, /* clk / (8 * bps) */
17 SCBRR_ALGO_4, /* (((clk * 2) + 16 * bps) / (32 * bps) - 1) */ 17 SCBRR_ALGO_4, /* DIV_ROUND_CLOSEST(clk, 16 * bps) - 1 */
18 SCBRR_ALGO_6, /* HSCIF variable sample rate algorithm */ 18 SCBRR_ALGO_6, /* HSCIF variable sample rate algorithm */
19}; 19};
20 20