summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>2011-11-17 17:28:12 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:01:12 +0200
commitc33b4a6e9b68f64c09519b5521815a4b5aa3b956 (patch)
tree055173ec3e7f0f4631bd32fc7d85df66a05bb0ac
parentdbeeede095da06655414a619175828303ed69b83 (diff)
ux500: pl011: remove hardcoding of uart instance
amba-pl011 mechanism detects the hardware register deadlock situation, and triggers a workaround tasklet. Tasklet implementation should execute workaround for the instance of the uart on which deadlock is detected. This patch provides the uart line number on whcich the deadlock is detected to the tasklet. ST-Ericsson ID: 355971 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ie8fbea42dc20cae1b604b555815935bcb5a70241 Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/38415 Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rw-r--r--drivers/tty/serial/amba-pl011.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 07d7081344e..0faee493eff 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -122,7 +122,9 @@ static const u32 uart_wa_reg[UART_WA_SAVE_NR] = {
};
static u32 uart_wa_regdata[UART_WA_SAVE_NR];
-static DECLARE_TASKLET(pl011_lockup_tlet, pl011_lockup_wa, 0);
+static unsigned int uart_wa_tlet_line;
+static DECLARE_TASKLET(pl011_lockup_tlet, pl011_lockup_wa,
+ (unsigned long) &uart_wa_tlet_line);
/* There is by now at least one vendor with differing details, so handle it */
struct vendor_data {
@@ -1111,7 +1113,7 @@ static inline bool pl011_dma_rx_running(struct uart_amba_port *uap)
*/
static void pl011_lockup_wa(unsigned long data)
{
- struct uart_amba_port *uap = amba_ports[0];
+ struct uart_amba_port *uap = amba_ports[*(unsigned int *)data];
void __iomem *base = uap->port.membase;
struct circ_buf *xmit = &uap->port.state->xmit;
struct tty_struct *tty = uap->port.state->port.tty;
@@ -1566,8 +1568,10 @@ static irqreturn_t pl011_int(int irq, void *dev_id)
pl011_tx_chars(uap);
if (pass_counter-- == 0) {
- if (uap->interrupt_may_hang)
+ if (uap->interrupt_may_hang) {
+ uart_wa_tlet_line = uap->port.line;
tasklet_schedule(&pl011_lockup_tlet);
+ }
break;
}