From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753866AbbFSPMp (ORCPT ); Fri, 19 Jun 2015 11:12:45 -0400 Received: from 8bytes.org ([81.169.241.247]:39363 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752364AbbFSPMh (ORCPT ); Fri, 19 Jun 2015 11:12:37 -0400 From: Joerg Roedel To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Joerg Roedel , Peter Hurley , Michael Welling , Joe Schultz Subject: [PATCH] serial: 8250: Do XR17V35X specific wakeup in serial8250_do_startup Date: Fri, 19 Jun 2015 17:12:17 +0200 Message-Id: <1434726737-2585-1-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel 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 Cc: Michael Welling Cc: Joe Schultz Signed-off-by: Joerg Roedel --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/