From: Joerg Roedel <joro@8bytes.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Joerg Roedel <jroedel@suse.de>,
Peter Hurley <peter@hurleysoftware.com>,
Michael Welling <mwelling@ieee.org>,
Joe Schultz <jschultz@xes-inc.com>
Subject: [PATCH] serial: 8250: Do XR17V35X specific wakeup in serial8250_do_startup
Date: Fri, 19 Jun 2015 17:12:17 +0200 [thread overview]
Message-ID: <1434726737-2585-1-git-send-email-joro@8bytes.org> (raw)
From: Joerg Roedel <jroedel@suse.de>
While debugging why my 8-port XR17V35X card does not work
with the in-kernel serial driver, I found that some chip
specific wakeup code is necessary to get it working.
Specificly the EFR_ECB bit needs to be set in the
chip-specific UART_XR_EFR register, so that writing to a
couple of other configuration bits is enabled.
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Michael Welling <mwelling@ieee.org>
Cc: Joe Schultz <jschultz@xes-inc.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/tty/serial/8250/8250_core.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 4506e40..de34db3 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -2176,6 +2176,18 @@ int serial8250_do_startup(struct uart_port *port)
*/
enable_rsa(up);
#endif
+
+ /*
+ * Do this right before clearing the FIFOs to prevent
+ * interrupt storm.
+ */
+ if (port->type == PORT_XR17V35X) {
+ /* Wake up and initialize UART */
+ serial_port_out(port, UART_XR_EFR, UART_EFR_ECB);
+ serial_port_out(port, UART_IER, 0);
+ serial_port_out(port, UART_LCR, 0);
+ }
+
/*
* Clear the FIFO buffers and disable them.
* (they will be reenabled in set_termios())
--
1.8.4.5
next reply other threads:[~2015-06-19 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 15:12 Joerg Roedel [this message]
2015-06-19 17:09 ` [PATCH] serial: 8250: Do XR17V35X specific wakeup in serial8250_do_startup Michael Welling
2015-06-29 15:26 ` Joerg Roedel
-- strict thread matches above, loose matches on Subject: below --
2015-07-16 8:29 Joerg Roedel
2015-07-16 8:55 ` Michael Welling
2015-07-17 13:34 ` Peter Hurley
2015-07-28 7:20 ` Joerg Roedel
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=1434726737-2585-1-git-send-email-joro@8bytes.org \
--to=joro@8bytes.org \
--cc=gregkh@linuxfoundation.org \
--cc=jroedel@suse.de \
--cc=jschultz@xes-inc.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mwelling@ieee.org \
--cc=peter@hurleysoftware.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).