]> git.karo-electronics.de Git - linux-beck.git/commit
serial: sh-sci: Avoid calculating the receive margin for HSCIF
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 16 Nov 2015 15:33:22 +0000 (16:33 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 17 Dec 2015 10:18:35 +0000 (11:18 +0100)
commit6c51332dfc23fc7c2c58244e35d36744db202077
tree94c4c23c9e44885410a97b7e5c690c4f3980a6c8
parent881a7489f463e59a44417ad89ecb4ea21b2b86cd
serial: sh-sci: Avoid calculating the receive margin for HSCIF

When assuming D = 0.5 and F = 0, maximizing the receive margin M is
equivalent to maximizing the sample rate N.

Hence there's no need to calculate the receive margin, as we can obtain
the same result by iterating over all possible sample rates in reverse
order, and skipping parameter sets that don't provide a lower bit rate
error.

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