From: Raphael Assenat <raph@8d.com>
To: linux-serial@vger.kernel.org
Subject: [PATCH] 8250: Add new UART type SC16C550
Date: Wed, 11 Jul 2012 15:54:53 -0400 [thread overview]
Message-ID: <20120711195453.GC4260@8d.com> (raw)
The NXP SC16C550 has a 16 Byte FIFO and support Automatic Flow Control,
enabled by setting bit 5 of MCR (a.k.a. AFE).
This patch adds a new 8250 port type (PORT_SC16C550) to support
this chip correcly. Should also work for TI TL16550C/D.
Tested on a custom OMAP board with an SC16C554 (quad uart) attached
to the GPMC. We experienced receive overruns when not using AFE.
Signed-off-by: Raphael Assenat <raph@8d.com>
diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index 6e1958a..ffea4f3 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
@@ -282,6 +282,13 @@ static const struct serial8250_config uart_config[] = {
.fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
.flags = UART_CAP_FIFO | UART_CAP_AFE | UART_CAP_EFR,
},
+ [PORT_SC16C550] = {
+ .name = "SC16C550",
+ .fifo_size = 16,
+ .tx_loadsz = 16,
+ .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
+ .flags = UART_CAP_FIFO | UART_CAP_AFE,
+ },
};
/* Uart divisor latch read */
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 65db992..e472af3 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -47,7 +47,8 @@
#define PORT_U6_16550A 19 /* ST-Ericsson U6xxx internal UART */
#define PORT_TEGRA 20 /* NVIDIA Tegra internal UART */
#define PORT_XR17D15X 21 /* Exar XR17D15x UART */
-#define PORT_MAX_8250 21 /* max port ID */
+#define PORT_SC16C550 22 /* NXP SC16C550 and equivalents */
+#define PORT_MAX_8250 22 /* max port ID */
/*
* ARM specific type numbers. These are not currently guaranteed
next reply other threads:[~2012-07-11 20:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 19:54 Raphael Assenat [this message]
2012-07-12 8:59 ` [PATCH] 8250: Add new UART type SC16C550 Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120711195453.GC4260@8d.com \
--to=raph@8d.com \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.