bc47af07f50a5c4c3156ce192afc41fffee86393
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / 3.2.16 / 0043-serial-PL011-move-interrupt-clearing.patch
1 From 02822f5ea52d9c9c4d197187b1a2553fe70f106c Mon Sep 17 00:00:00 2001
2 From: Linus Walleij <linus.walleij@linaro.org>
3 Date: Wed, 21 Mar 2012 20:15:18 +0100
4 Subject: [PATCH 43/69] serial: PL011: move interrupt clearing
6 commit c3d8b76f61586714cdc5f219ba45592a54caaa55 upstream.
8 Commit 360f748b204275229f8398cb2f9f53955db1503b
9 "serial: PL011: clear pending interrupts"
10 attempts to clear interrupts by writing to a
11 yet-unassigned memory address. This fixes the issue.
13 The breaking patch is marked for stable so should be
14 carried along with the other patch.
16 Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
17 Cc: Russell King <linux@arm.linux.org.uk>
18 Cc: Nicolas Pitre <nico@fluxnic.net>
19 Reported-by: Viresh Kumar <viresh.kumar@st.com>
20 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
21 Tested-by: Grant Likely <grant.likely@secretlab.ca>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 ---
24 drivers/tty/serial/amba-pl011.c | 8 ++++----
25 1 file changed, 4 insertions(+), 4 deletions(-)
27 diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
28 index dddc3f2..6da8cf8 100644
29 --- a/drivers/tty/serial/amba-pl011.c
30 +++ b/drivers/tty/serial/amba-pl011.c
31 @@ -1919,10 +1919,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
32 goto unmap;
33 }
35 - /* Ensure interrupts from this UART are masked and cleared */
36 - writew(0, uap->port.membase + UART011_IMSC);
37 - writew(0xffff, uap->port.membase + UART011_ICR);
38 -
39 uap->vendor = vendor;
40 uap->lcrh_rx = vendor->lcrh_rx;
41 uap->lcrh_tx = vendor->lcrh_tx;
42 @@ -1939,6 +1935,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
43 uap->port.line = i;
44 pl011_dma_probe(uap);
46 + /* Ensure interrupts from this UART are masked and cleared */
47 + writew(0, uap->port.membase + UART011_IMSC);
48 + writew(0xffff, uap->port.membase + UART011_ICR);
49 +
50 snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev));
52 amba_ports[i] = uap;
53 --
54 1.7.9.5