Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105433
b: refs/heads/master
c: 3771359
h: refs/heads/master
i:
  105431: e664ac2
v: v3
  • Loading branch information
Maciej W. Rozycki authored and Linus Torvalds committed Jul 24, 2008
1 parent a719374 commit bd77f4a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b76c5a0717094f0a900d9afd8e36f7ad8dbba587
refs/heads/master: 377135912806ddc87d56d64fafa685f4063c45f1
21 changes: 19 additions & 2 deletions trunk/drivers/serial/zs.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,6 @@ static int zs_startup(struct uart_port *uport)
zport->regs[1] &= ~RxINT_MASK;
zport->regs[1] |= RxINT_ALL | TxINT_ENAB | EXT_INT_ENAB;
zport->regs[3] |= RxENABLE;
zport->regs[5] |= TxENAB;
zport->regs[15] |= BRKIE;
write_zsreg(zport, R1, zport->regs[1]);
write_zsreg(zport, R3, zport->regs[3]);
Expand All @@ -814,7 +813,6 @@ static void zs_shutdown(struct uart_port *uport)

spin_lock_irqsave(&scc->zlock, flags);

zport->regs[5] &= ~TxENAB;
zport->regs[3] &= ~RxENABLE;
write_zsreg(zport, R5, zport->regs[5]);
write_zsreg(zport, R3, zport->regs[3]);
Expand Down Expand Up @@ -959,6 +957,23 @@ static void zs_set_termios(struct uart_port *uport, struct ktermios *termios,
spin_unlock_irqrestore(&scc->zlock, flags);
}

/*
* Hack alert!
* Required solely so that the initial PROM-based console
* works undisturbed in parallel with this one.
*/
static void zs_pm(struct uart_port *uport, unsigned int state,
unsigned int oldstate)
{
struct zs_port *zport = to_zport(uport);

if (state < 3)
zport->regs[5] |= TxENAB;
else
zport->regs[5] &= ~TxENAB;
write_zsreg(zport, R5, zport->regs[5]);
}


static const char *zs_type(struct uart_port *uport)
{
Expand Down Expand Up @@ -1041,6 +1056,7 @@ static struct uart_ops zs_ops = {
.startup = zs_startup,
.shutdown = zs_shutdown,
.set_termios = zs_set_termios,
.pm = zs_pm,
.type = zs_type,
.release_port = zs_release_port,
.request_port = zs_request_port,
Expand Down Expand Up @@ -1190,6 +1206,7 @@ static int __init zs_console_setup(struct console *co, char *options)
return ret;

zs_reset(zport);
zs_pm(uport, 0, -1);

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

0 comments on commit bd77f4a

Please sign in to comment.