linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: Known issues with amba-pl010.c driver?
Date: Fri, 21 May 2010 22:35:29 +0100	[thread overview]
Message-ID: <20100521213529.GJ11042@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <0D753D10438DA54287A00B0270842697636F32378A@AUSP01VMBX24.collaborationhost.net>

On Fri, May 21, 2010 at 04:17:28PM -0500, H Hartley Sweeten wrote:
> Hard to tell, but it is very noticeable just doing something like 'dmesg'
> on the console.
> 
> I first get some random number of characters, anywhere from none to something
> less than a full line (80 characters).  Then there is a noticeable pause.  This
> is followed by some random length block of data, another pause, then the
> remainder of the output.
> 
> I'm not sure if it will help but the 'dmesg' output on my system is 7,472
> bytes.
> 
> It might have nothing to do with the pl010 driver itself.  I just don't know
> where to start digging in the driver stack to figure out where the pauses are
> coming from.

I assume that this isn't a new problem, but something that's always
happened?

The function in pl010 which loads the characters into the TX fifo is
pl010_tx_chars().  Note that without XON/XOFF flow control,
uap->port.x_char will always be zero.

The loop which loads the FIFO is:

        count = uap->port.fifosize >> 1;
        do {
                writel(xmit->buf[xmit->tail], uap->port.membase + UART01x_DR);
                xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
                uap->port.icount.tx++;
                if (uart_circ_empty(xmit))
                        break;
        } while (--count > 0);

and the thinking here is that the hardware gives us an interrupt when the
FIFO drops below half-full, so we load the FIFO up with up to half the
maximum number of characters at each interrupt.

In the case of ARM's PL010, that's a 16 byte FIFO - but yours may be
a different depth.  If it's smaller, the driver needs to know that so
it doesn't overrun the FIFO.  I'd suggest ensuring that 'fifosize' is
correct for your implementation.

  reply	other threads:[~2010-05-21 21:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19  0:22 Known issues with amba-pl010.c driver? H Hartley Sweeten
2010-05-21 19:31 ` Russell King - ARM Linux
2010-05-21 21:17   ` H Hartley Sweeten
2010-05-21 21:35     ` Russell King - ARM Linux [this message]
2010-05-21 21:50       ` H Hartley Sweeten

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=20100521213529.GJ11042@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).