summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/sh-sci.h
diff options
context:
space:
mode:
authorUlrich Hecht <ulrich.hecht+renesas@gmail.com>2018-04-04 17:48:51 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 10:08:18 +0200
commit63ba1e00f178a4483b473489cadc4eb52a77df2a (patch)
tree0c5c157f62ea8a446807e9d4a9d217085f670d9f /drivers/tty/serial/sh-sci.h
parent7678f4c20fa7670fcc23e2537a26543c5c6a7772 (diff)
serial: sh-sci: Support for HSCIF RX sampling point adjustment
HSCIF has facilities that allow moving the RX sampling point by between -8 and 7 sampling cycles (one sampling cycles equals 1/15 of a bit by default) to improve the error margin in case of slightly mismatched bit rates between sender and receiver. This patch tries to determine if shifting the sampling point can improve the error margin and will enable it if so. Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sh-sci.h')
-rw-r--r--drivers/tty/serial/sh-sci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/sh-sci.h b/drivers/tty/serial/sh-sci.h
index a5f792fd48d9..0b9e804e61a9 100644
--- a/drivers/tty/serial/sh-sci.h
+++ b/drivers/tty/serial/sh-sci.h
@@ -130,6 +130,10 @@ enum {
/* HSSRR HSCIF */
#define HSCIF_SRE BIT(15) /* Sampling Rate Register Enable */
+#define HSCIF_SRDE BIT(14) /* Sampling Point Register Enable */
+
+#define HSCIF_SRHP_SHIFT 8
+#define HSCIF_SRHP_MASK 0x0f00
/* SCPCR (Serial Port Control Register), SCIFA/SCIFB only */
#define SCPCR_RTSC BIT(4) /* Serial Port RTS# Pin / Output Pin */