Thread (9 messages) 9 messages, 5 authors, 2012-03-12
STALE5193d

Re: [PATCH] serial: PL011: clear pending interrupts

From: Russell King - ARM Linux <hidden>
Date: 2012-03-12 10:03:45
Also in: linux-arm-kernel

On Mon, Mar 12, 2012 at 09:27:28AM +0000, James Courtier-Dutton wrote:
On 12 March 2012 08:25, Linus Walleij [off-list ref] wrote:
quoted
From: Linus Walleij <redacted>

Chanho Min reported that when the boot loader transfers
control to the kernel, there may be pending interrupts
causing the UART to lock up in an eternal loop trying to
pick tokens from the FIFO (since the RX interrupt flag
indicates there are tokens) while in practice there are
no tokens - in fact there is only a pending IRQ flag.
I might be off base here, because I don't know this particular UART,
but if an IRQ routine is called because the RX interrupt flag is set,
shouldn't the IRQ routine be written in such a way that it can never
lock up.
The problem is that there are two flags:

1. The receiver interrupt status flags
2. The fifo status flags

It appears that there's a condition where the receiver interrupt flags can
indicate that characters are pending, but the status flags say that there
are no characters pending in the receive buffer.

This occurs because it seems there's a hardware bug when switching from
FIFO mode to non-FIFO mode - this causes previously received characters
to be hidden from the FIFO status flags.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help