All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] ARM: PL011: Ensure error flags are clear at startup
Date: Mon, 03 Jan 2011 10:08:38 +0000	[thread overview]
Message-ID: <E1PZhLC-0007pV-Fu@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20110103100753.GB26785@n2100.arm.linux.org.uk>

The error flags weren't being cleared upon UART startup, which
can cause problems when we add DMA support.  It's good practice
to ensure that these flags are cleared anyway, so let's do so.

This was part of a larger patch from Linus Walleij.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/serial/amba-pl011.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index 2c07939..c77b3eb 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -424,6 +424,10 @@ static int pl011_startup(struct uart_port *port)
 	cr = UART01x_CR_UARTEN | UART011_CR_RXE | UART011_CR_TXE;
 	writew(cr, uap->port.membase + UART011_CR);
 
+	/* Clear pending error interrupts */
+	writew(UART011_OEIS | UART011_BEIS | UART011_PEIS | UART011_FEIS,
+	       uap->port.membase + UART011_ICR);
+
 	/*
 	 * initialise the old status of the modem signals
 	 */
-- 
1.6.2.5

  parent reply	other threads:[~2011-01-03 10:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-03 10:07 [PATCH 0/7] PL011 DMA support Russell King - ARM Linux
2011-01-03 10:08 ` [PATCH 1/7] ARM: PL011: include revision number in boot-time port printk Russell King - ARM Linux
2011-01-03 10:08 ` Russell King - ARM Linux [this message]
2011-01-03 10:08 ` [PATCH 3/7] ARM: PL011: Allow better handling of vendor data Russell King - ARM Linux
2011-01-03 10:09 ` [PATCH 4/7] ARM: PL011: Separate hardware FIFO size from TTY FIFO size Russell King - ARM Linux
2011-01-03 10:09 ` [PATCH 5/7] ARM: PL011: Ensure IRQs are disabled in UART interrupt handler Russell King - ARM Linux
2011-01-03 10:10 ` [PATCH 6/7] ARM: PL011: Add support for transmit DMA Russell King - ARM Linux
2011-01-03 11:12   ` Rabin Vincent
2011-01-03 16:30     ` Russell King - ARM Linux
2011-01-03 10:10 ` [PATCH 7/7] ARM: PL011: add DMA burst threshold support for ST variants Russell King - ARM Linux
2011-01-03 11:01 ` [PATCH 0/7] PL011 DMA support Russell King - ARM Linux
2011-01-05 12:32 ` Linus Walleij

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=E1PZhLC-0007pV-Fu@rmk-PC.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.