Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755160AbbGPI4B (ORCPT ); Thu, 16 Jul 2015 04:56:01 -0400 Received: from mail-ig0-f175.google.com ([209.85.213.175]:34203 "EHLO mail-ig0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754039AbbGPIz5 (ORCPT ); Thu, 16 Jul 2015 04:55:57 -0400 Date: Thu, 16 Jul 2015 03:55:19 -0500 From: Michael Welling To: Joerg Roedel Cc: Greg Kroah-Hartman , Jiri Slaby , Peter Hurley , Sebastian Andrzej Siewior , Tony Lindgren , Alan Cox , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Joerg Roedel , Joe Schultz Subject: Re: [PATCH] serial: 8250: Do XR17V35X specific wakeup in serial8250_do_startup Message-ID: <20150716085519.GA29279@deathray> References: <1437035353-13708-1-git-send-email-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437035353-13708-1-git-send-email-joro@8bytes.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1860 Lines: 58 On Thu, Jul 16, 2015 at 10:29:13AM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > The XR17V35X UART needs the ECB bit set in its XR_EFR > register to enable access to IER [7:5], ISR [5:4], FCR[5:4], > MCR[7:5], and MSR [7:0]. > > Also reset the IER register to mask interrupts after access > to all bits of this register has been enabled. > > This makes my 8-port XR17V35X working with the in-kernel > serial driver. > > Cc: Peter Hurley > Cc: Michael Welling > Cc: Joe Schultz > Signed-off-by: Joerg Roedel > --- > drivers/tty/serial/8250/8250_core.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c > index 37fff12..4124a91 100644 > --- a/drivers/tty/serial/8250/8250_core.c > +++ b/drivers/tty/serial/8250/8250_core.c > @@ -2164,6 +2164,21 @@ int serial8250_do_startup(struct uart_port *port) > */ > enable_rsa(up); > #endif > + > + if (port->type == PORT_XR17V35X) { > + /* > + * First enable access to IER [7:5], ISR [5:4], FCR [5:4], > + * MCR [7:5] and MSR [7:0] > + */ > + serial_port_out(port, UART_XR_EFR, UART_EFR_ECB); > + > + /* > + * Make sure all interrups are masked until initialization is > + * complete and the FIFOs are cleared > + */ > + serial_port_out(port, UART_IER, 0); > + } > + Reviewed-by: Michael Welling > /* > * Clear the FIFO buffers and disable them. > * (they will be reenabled in set_termios()) > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/