Re: [PATCH] tty: amba-pl011: Make TX optimisation conditional

2019-07-12 Thread Dave Martin
On Fri, Jul 12, 2019 at 01:20:42PM +0100, Phil Elwell wrote: > Hi Rogier, > > On 12/07/2019 13:10, Rogier Wolff wrote: > > On Fri, Jul 12, 2019 at 12:21:05PM +0100, Dave Martin wrote: > >> diff --git a/drivers/tty/serial/amba-pl011.c > >> b/drivers/tty/serial/amba-pl011.c > >> index 89ade21..1902

Re: [PATCH] tty: amba-pl011: Make TX optimisation conditional

2019-07-12 Thread Phil Elwell
Hi Rogier, On 12/07/2019 13:10, Rogier Wolff wrote: > On Fri, Jul 12, 2019 at 12:21:05PM +0100, Dave Martin wrote: >> diff --git a/drivers/tty/serial/amba-pl011.c >> b/drivers/tty/serial/amba-pl011.c >> index 89ade21..1902071 100644 >> --- a/drivers/tty/serial/amba-pl011.c >> +++ b/drivers/tty/se

Re: [PATCH] tty: amba-pl011: Make TX optimisation conditional

2019-07-12 Thread Rogier Wolff
On Fri, Jul 12, 2019 at 12:21:05PM +0100, Dave Martin wrote: > diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c > index 89ade21..1902071 100644 > --- a/drivers/tty/serial/amba-pl011.c > +++ b/drivers/tty/serial/amba-pl011.c > @@ -1307,6 +1307,13 @@ static bool pl011_tx

Re: [PATCH] tty: amba-pl011: Make TX optimisation conditional

2019-07-12 Thread Phil Elwell
Hi Dave, Thanks for the reply. On 12/07/2019 12:21, Dave Martin wrote: > On Thu, Jul 11, 2019 at 02:45:32PM +0100, Phil Elwell wrote: >> pl011_tx_chars takes a "from_irq" parameter to reduce the number of >> register accesses. When from_irq is true the function assumes that the >> FIFO is half em

Re: [PATCH] tty: amba-pl011: Make TX optimisation conditional

2019-07-12 Thread Dave Martin
On Thu, Jul 11, 2019 at 02:45:32PM +0100, Phil Elwell wrote: > pl011_tx_chars takes a "from_irq" parameter to reduce the number of > register accesses. When from_irq is true the function assumes that the > FIFO is half empty and writes up to half a FIFO's worth of bytes > without polling the FIFO s

[PATCH] tty: amba-pl011: Make TX optimisation conditional

2019-07-11 Thread Phil Elwell
pl011_tx_chars takes a "from_irq" parameter to reduce the number of register accesses. When from_irq is true the function assumes that the FIFO is half empty and writes up to half a FIFO's worth of bytes without polling the FIFO status register, the reasoning being that the function is being called