Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-10 Thread James Hogan
On Tuesday 10 December 2013 09:11:55 Ezequiel Garcia wrote: > Hi Tim, James: > > On Mon, Dec 09, 2013 at 04:42:23PM -0800, Tim Kryger wrote: > > On Fri, Dec 6, 2013 at 4:59 PM, James Hogan wrote: > [..] > > > diff --git a/drivers/tty/serial/8250/8250_dw.c > >

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-10 Thread Ezequiel Garcia
Hi Tim, James: On Mon, Dec 09, 2013 at 04:42:23PM -0800, Tim Kryger wrote: > On Fri, Dec 6, 2013 at 4:59 PM, James Hogan wrote: > [..] > diff --git a/drivers/tty/serial/8250/8250_dw.c > b/drivers/tty/serial/8250/8250_dw.c > index 4658e3e..5f096c7 100644 > --- a/drivers/tty/serial/8250/8250_dw.c

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-10 Thread James Hogan
On Tuesday 10 December 2013 09:11:55 Ezequiel Garcia wrote: Hi Tim, James: On Mon, Dec 09, 2013 at 04:42:23PM -0800, Tim Kryger wrote: On Fri, Dec 6, 2013 at 4:59 PM, James Hogan james.ho...@imgtec.com wrote: [..] diff --git a/drivers/tty/serial/8250/8250_dw.c

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-10 Thread Ezequiel Garcia
Hi Tim, James: On Mon, Dec 09, 2013 at 04:42:23PM -0800, Tim Kryger wrote: On Fri, Dec 6, 2013 at 4:59 PM, James Hogan james.ho...@imgtec.com wrote: [..] diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 4658e3e..5f096c7 100644 ---

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-09 Thread Tim Kryger
On Fri, Dec 6, 2013 at 4:59 PM, James Hogan wrote: > It appears to work with ~0x20 too, and the workaround isn't getting hit (only > tested boot and logging in - nothing fancy). I think having the printks in > this code with the console directed at the serial must have caused > resursion/busy

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-09 Thread Tim Kryger
On Fri, Dec 6, 2013 at 4:59 PM, James Hogan james.ho...@imgtec.com wrote: It appears to work with ~0x20 too, and the workaround isn't getting hit (only tested boot and logging in - nothing fancy). I think having the printks in this code with the console directed at the serial must have caused

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-06 Thread James Hogan
On Friday 06 December 2013 16:31:38 Tim Kryger wrote: > On Fri, Dec 6, 2013 at 3:51 PM, James Hogan wrote: > > On Friday 06 December 2013 23:29:02 James Hogan wrote: > >> So it looks like the LCR does always change immediately for me in this > >> case > >> (obviously it hasn't hit the BUSY case),

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-06 Thread Tim Kryger
On Fri, Dec 6, 2013 at 3:51 PM, James Hogan wrote: > On Friday 06 December 2013 23:29:02 James Hogan wrote: >> So it looks like the LCR does always change immediately for me in this case >> (obviously it hasn't hit the BUSY case), but not all the bits can be >> written. In particular bit 5 and

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-06 Thread James Hogan
On Friday 06 December 2013 23:29:02 James Hogan wrote: > So it looks like the LCR does always change immediately for me in this case > (obviously it hasn't hit the BUSY case), but not all the bits can be > written. In particular bit 5 and bit 7 at the least. If I do this (sorry > for whitespace

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-06 Thread James Hogan
On Tuesday 26 November 2013 15:36:00 Ezequiel Garcia wrote: > Hello, > > On Tue, Oct 01, 2013 at 10:18:08AM -0700, Tim Kryger wrote: > > When configured with UART_16550_COMPATIBLE=NO or in versions prior to > > the introduction of this option, the Designware UART will ignore writes > > to the LCR

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-06 Thread James Hogan
On Tuesday 26 November 2013 15:36:00 Ezequiel Garcia wrote: Hello, On Tue, Oct 01, 2013 at 10:18:08AM -0700, Tim Kryger wrote: When configured with UART_16550_COMPATIBLE=NO or in versions prior to the introduction of this option, the Designware UART will ignore writes to the LCR if the

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-06 Thread James Hogan
On Friday 06 December 2013 23:29:02 James Hogan wrote: So it looks like the LCR does always change immediately for me in this case (obviously it hasn't hit the BUSY case), but not all the bits can be written. In particular bit 5 and bit 7 at the least. If I do this (sorry for whitespace

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-06 Thread Tim Kryger
On Fri, Dec 6, 2013 at 3:51 PM, James Hogan james.ho...@imgtec.com wrote: On Friday 06 December 2013 23:29:02 James Hogan wrote: So it looks like the LCR does always change immediately for me in this case (obviously it hasn't hit the BUSY case), but not all the bits can be written. In

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-06 Thread James Hogan
On Friday 06 December 2013 16:31:38 Tim Kryger wrote: On Fri, Dec 6, 2013 at 3:51 PM, James Hogan james.ho...@imgtec.com wrote: On Friday 06 December 2013 23:29:02 James Hogan wrote: So it looks like the LCR does always change immediately for me in this case (obviously it hasn't hit the

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-04 Thread Tim Kryger
On Wed, Dec 4, 2013 at 5:01 AM, Ezequiel Garcia wrote: > On Thu, Nov 28, 2013 at 04:53:37PM -0300, Ezequiel Garcia wrote: >> On Thu, Nov 28, 2013 at 04:47:20PM -0300, Ezequiel Garcia wrote: >> > Changing the console port by setting "console=ttyS1,115200" gives this: >> > >> > [..] >> > Serial:

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-04 Thread Ezequiel Garcia
On Thu, Nov 28, 2013 at 04:53:37PM -0300, Ezequiel Garcia wrote: > On Thu, Nov 28, 2013 at 04:47:20PM -0300, Ezequiel Garcia wrote: > > Hi Thomas, Tim: > > > > On Thu, Nov 28, 2013 at 09:30:34AM +0100, Thomas Petazzoni wrote: > > > Dear Ezequiel Garcia, > > > > > > On Wed, 27 Nov 2013 15:54:49

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-04 Thread Ezequiel Garcia
On Thu, Nov 28, 2013 at 04:53:37PM -0300, Ezequiel Garcia wrote: On Thu, Nov 28, 2013 at 04:47:20PM -0300, Ezequiel Garcia wrote: Hi Thomas, Tim: On Thu, Nov 28, 2013 at 09:30:34AM +0100, Thomas Petazzoni wrote: Dear Ezequiel Garcia, On Wed, 27 Nov 2013 15:54:49 -0300, Ezequiel

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-12-04 Thread Tim Kryger
On Wed, Dec 4, 2013 at 5:01 AM, Ezequiel Garcia ezequiel.gar...@free-electrons.com wrote: On Thu, Nov 28, 2013 at 04:53:37PM -0300, Ezequiel Garcia wrote: On Thu, Nov 28, 2013 at 04:47:20PM -0300, Ezequiel Garcia wrote: Changing the console port by setting console=ttyS1,115200 gives this:

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-28 Thread Ezequiel Garcia
On Thu, Nov 28, 2013 at 04:47:20PM -0300, Ezequiel Garcia wrote: > Hi Thomas, Tim: > > On Thu, Nov 28, 2013 at 09:30:34AM +0100, Thomas Petazzoni wrote: > > Dear Ezequiel Garcia, > > > > On Wed, 27 Nov 2013 15:54:49 -0300, Ezequiel Garcia wrote: > > > > > > An external device may be keeping the

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-28 Thread Ezequiel Garcia
Hi Thomas, Tim: On Thu, Nov 28, 2013 at 09:30:34AM +0100, Thomas Petazzoni wrote: > Dear Ezequiel Garcia, > > On Wed, 27 Nov 2013 15:54:49 -0300, Ezequiel Garcia wrote: > > > > An external device may be keeping the UART busy and preventing LCR > > > from being written. > > > > > > What device

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-28 Thread Thomas Petazzoni
Dear Ezequiel Garcia, On Wed, 27 Nov 2013 15:54:49 -0300, Ezequiel Garcia wrote: > > An external device may be keeping the UART busy and preventing LCR > > from being written. > > > > What device is attached to ttyS1? > > There's no device attached at ttyS1. I've just tested this in another >

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-28 Thread Thomas Petazzoni
Dear Ezequiel Garcia, On Wed, 27 Nov 2013 15:54:49 -0300, Ezequiel Garcia wrote: An external device may be keeping the UART busy and preventing LCR from being written. What device is attached to ttyS1? There's no device attached at ttyS1. I've just tested this in another box and it

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-28 Thread Ezequiel Garcia
Hi Thomas, Tim: On Thu, Nov 28, 2013 at 09:30:34AM +0100, Thomas Petazzoni wrote: Dear Ezequiel Garcia, On Wed, 27 Nov 2013 15:54:49 -0300, Ezequiel Garcia wrote: An external device may be keeping the UART busy and preventing LCR from being written. What device is attached to

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-28 Thread Ezequiel Garcia
On Thu, Nov 28, 2013 at 04:47:20PM -0300, Ezequiel Garcia wrote: Hi Thomas, Tim: On Thu, Nov 28, 2013 at 09:30:34AM +0100, Thomas Petazzoni wrote: Dear Ezequiel Garcia, On Wed, 27 Nov 2013 15:54:49 -0300, Ezequiel Garcia wrote: An external device may be keeping the UART busy and

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-27 Thread Tim Kryger
On Wed, Nov 27, 2013 at 10:54 AM, Ezequiel Garcia wrote: > On Tue, Nov 26, 2013 at 03:03:03PM -0800, Tim Kryger wrote: >> An external device may be keeping the UART busy and preventing LCR >> from being written. >> >> What device is attached to ttyS1? > > There's no device attached at ttyS1.

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-27 Thread Ezequiel Garcia
On Tue, Nov 26, 2013 at 03:03:03PM -0800, Tim Kryger wrote: > On Tue, Nov 26, 2013 at 10:36 AM, Ezequiel Garcia > wrote: > > > Since v3.13-rc1, this commit seems to have introduced some oddities on > > some of our boards. See this log snippet: > > > > Serial: 8250/16550 driver, 4 ports, IRQ

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-27 Thread Ezequiel Garcia
On Tue, Nov 26, 2013 at 03:03:03PM -0800, Tim Kryger wrote: On Tue, Nov 26, 2013 at 10:36 AM, Ezequiel Garcia ezequiel.gar...@free-electrons.com wrote: Since v3.13-rc1, this commit seems to have introduced some oddities on some of our boards. See this log snippet: Serial: 8250/16550

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-27 Thread Tim Kryger
On Wed, Nov 27, 2013 at 10:54 AM, Ezequiel Garcia ezequiel.gar...@free-electrons.com wrote: On Tue, Nov 26, 2013 at 03:03:03PM -0800, Tim Kryger wrote: An external device may be keeping the UART busy and preventing LCR from being written. What device is attached to ttyS1? There's no device

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-26 Thread Tim Kryger
On Tue, Nov 26, 2013 at 10:36 AM, Ezequiel Garcia wrote: > Since v3.13-rc1, this commit seems to have introduced some oddities on > some of our boards. See this log snippet: > > Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled > R�console [ttyS0] enabled > console [ttyS0] enabled >

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-26 Thread Ezequiel Garcia
Hello, On Tue, Oct 01, 2013 at 10:18:08AM -0700, Tim Kryger wrote: > When configured with UART_16550_COMPATIBLE=NO or in versions prior to > the introduction of this option, the Designware UART will ignore writes > to the LCR if the UART is busy. The current workaround saves a copy of > the last

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-26 Thread Ezequiel Garcia
Hello, On Tue, Oct 01, 2013 at 10:18:08AM -0700, Tim Kryger wrote: When configured with UART_16550_COMPATIBLE=NO or in versions prior to the introduction of this option, the Designware UART will ignore writes to the LCR if the UART is busy. The current workaround saves a copy of the last

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-11-26 Thread Tim Kryger
On Tue, Nov 26, 2013 at 10:36 AM, Ezequiel Garcia ezequiel.gar...@free-electrons.com wrote: Since v3.13-rc1, this commit seems to have introduced some oddities on some of our boards. See this log snippet: Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled R�console [ttyS0] enabled

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-10-02 Thread Heikki Krogerus
Hi, On Tue, Oct 01, 2013 at 10:18:08AM -0700, Tim Kryger wrote: > When configured with UART_16550_COMPATIBLE=NO or in versions prior to > the introduction of this option, the Designware UART will ignore writes > to the LCR if the UART is busy. The current workaround saves a copy of > the last

Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-10-02 Thread Heikki Krogerus
Hi, On Tue, Oct 01, 2013 at 10:18:08AM -0700, Tim Kryger wrote: When configured with UART_16550_COMPATIBLE=NO or in versions prior to the introduction of this option, the Designware UART will ignore writes to the LCR if the UART is busy. The current workaround saves a copy of the last

[PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-10-01 Thread Tim Kryger
When configured with UART_16550_COMPATIBLE=NO or in versions prior to the introduction of this option, the Designware UART will ignore writes to the LCR if the UART is busy. The current workaround saves a copy of the last written LCR and re-writes it in the ISR for a special interrupt that is

[PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

2013-10-01 Thread Tim Kryger
When configured with UART_16550_COMPATIBLE=NO or in versions prior to the introduction of this option, the Designware UART will ignore writes to the LCR if the UART is busy. The current workaround saves a copy of the last written LCR and re-writes it in the ISR for a special interrupt that is