aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-03-21 15:15:18 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-06 17:04:33 -0400
commitc3d8b76f61586714cdc5f219ba45592a54caaa55 (patch)
treeadc17723f363e1f603947bf8bd76e378037ac960 /drivers/tty
parentdd775ae2549217d3ae09363e3edb305d0fa19928 (diff)
serial: PL011: move interrupt clearing
Commit 360f748b204275229f8398cb2f9f53955db1503b "serial: PL011: clear pending interrupts" attempts to clear interrupts by writing to a yet-unassigned memory address. This fixes the issue. The breaking patch is marked for stable so should be carried along with the other patch. Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: stable <stable@vger.kernel.org> Cc: Nicolas Pitre <nico@fluxnic.net> Reported-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/amba-pl011.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 0c65c9e66986..3d569cd68f58 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1946,10 +1946,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
1946 goto unmap; 1946 goto unmap;
1947 } 1947 }
1948 1948
1949 /* Ensure interrupts from this UART are masked and cleared */
1950 writew(0, uap->port.membase + UART011_IMSC);
1951 writew(0xffff, uap->port.membase + UART011_ICR);
1952
1953 uap->vendor = vendor; 1949 uap->vendor = vendor;
1954 uap->lcrh_rx = vendor->lcrh_rx; 1950 uap->lcrh_rx = vendor->lcrh_rx;
1955 uap->lcrh_tx = vendor->lcrh_tx; 1951 uap->lcrh_tx = vendor->lcrh_tx;
@@ -1967,6 +1963,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
1967 uap->port.line = i; 1963 uap->port.line = i;
1968 pl011_dma_probe(uap); 1964 pl011_dma_probe(uap);
1969 1965
1966 /* Ensure interrupts from this UART are masked and cleared */
1967 writew(0, uap->port.membase + UART011_IMSC);
1968 writew(0xffff, uap->port.membase + UART011_ICR);
1969
1970 snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev)); 1970 snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev));
1971 1971
1972 amba_ports[i] = uap; 1972 amba_ports[i] = uap;