Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287057
b: refs/heads/master
c: ef605fd
h: refs/heads/master
i:
  287055: 260929a
v: v3
  • Loading branch information
Rabin Vincent authored and Greg Kroah-Hartman committed Jan 25, 2012
1 parent f184a29 commit 5ddf27a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d8d8ffa477831b713ddfa2ad4d0ca545f3b567e5
refs/heads/master: ef605fdb33883d687cff5ba75095a91b313b4966
14 changes: 14 additions & 0 deletions trunk/drivers/tty/serial/amba-pl011.c
Original file line number Diff line number Diff line change
Expand Up @@ -1751,9 +1751,19 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
{
struct uart_amba_port *uap = amba_ports[co->index];
unsigned int status, old_cr, new_cr;
unsigned long flags;
int locked = 1;

clk_enable(uap->clk);

local_irq_save(flags);
if (uap->port.sysrq)
locked = 0;
else if (oops_in_progress)
locked = spin_trylock(&uap->port.lock);
else
spin_lock(&uap->port.lock);

/*
* First save the CR then disable the interrupts
*/
Expand All @@ -1773,6 +1783,10 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
} while (status & UART01x_FR_BUSY);
writew(old_cr, uap->port.membase + UART011_CR);

if (locked)
spin_unlock(&uap->port.lock);
local_irq_restore(flags);

clk_disable(uap->clk);
}

Expand Down

0 comments on commit 5ddf27a

Please sign in to comment.