Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105434
b: refs/heads/master
c: e9a8f4d
h: refs/heads/master
v: v3
  • Loading branch information
Maciej W. Rozycki authored and Linus Torvalds committed Jul 24, 2008
1 parent bd77f4a commit bea81a5
Show file tree
Hide file tree
Showing 2 changed files with 25 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: 377135912806ddc87d56d64fafa685f4063c45f1
refs/heads/master: e9a8f4d1de12633bfb71b5fee47745b32877b7b5
24 changes: 24 additions & 0 deletions trunk/drivers/serial/dz.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,26 @@ static void dz_set_termios(struct uart_port *uport, struct ktermios *termios,
spin_unlock_irqrestore(&dport->port.lock, flags);
}

/*
* Hack alert!
* Required solely so that the initial PROM-based console
* works undisturbed in parallel with this one.
*/
static void dz_pm(struct uart_port *uport, unsigned int state,
unsigned int oldstate)
{
struct dz_port *dport = to_dport(uport);
unsigned long flags;

spin_lock_irqsave(&dport->port.lock, flags);
if (state < 3)
dz_start_tx(&dport->port);
else
dz_stop_tx(&dport->port);
spin_unlock_irqrestore(&dport->port.lock, flags);
}


static const char *dz_type(struct uart_port *uport)
{
return "DZ";
Expand Down Expand Up @@ -738,6 +758,7 @@ static struct uart_ops dz_ops = {
.startup = dz_startup,
.shutdown = dz_shutdown,
.set_termios = dz_set_termios,
.pm = dz_pm,
.type = dz_type,
.release_port = dz_release_port,
.request_port = dz_request_port,
Expand Down Expand Up @@ -861,7 +882,10 @@ static int __init dz_console_setup(struct console *co, char *options)
if (ret)
return ret;

spin_lock_init(&dport->port.lock); /* For dz_pm(). */

dz_reset(dport);
dz_pm(uport, 0, -1);

if (options)
uart_parse_options(options, &baud, &parity, &bits, &flow);
Expand Down

0 comments on commit bea81a5

Please sign in to comment.