diff options
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/zs.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/serial/zs.c b/drivers/serial/zs.c index bd45b6230fd..9e6a873f820 100644 --- a/drivers/serial/zs.c +++ b/drivers/serial/zs.c | |||
@@ -787,7 +787,6 @@ static int zs_startup(struct uart_port *uport) | |||
787 | zport->regs[1] &= ~RxINT_MASK; | 787 | zport->regs[1] &= ~RxINT_MASK; |
788 | zport->regs[1] |= RxINT_ALL | TxINT_ENAB | EXT_INT_ENAB; | 788 | zport->regs[1] |= RxINT_ALL | TxINT_ENAB | EXT_INT_ENAB; |
789 | zport->regs[3] |= RxENABLE; | 789 | zport->regs[3] |= RxENABLE; |
790 | zport->regs[5] |= TxENAB; | ||
791 | zport->regs[15] |= BRKIE; | 790 | zport->regs[15] |= BRKIE; |
792 | write_zsreg(zport, R1, zport->regs[1]); | 791 | write_zsreg(zport, R1, zport->regs[1]); |
793 | write_zsreg(zport, R3, zport->regs[3]); | 792 | write_zsreg(zport, R3, zport->regs[3]); |
@@ -814,7 +813,6 @@ static void zs_shutdown(struct uart_port *uport) | |||
814 | 813 | ||
815 | spin_lock_irqsave(&scc->zlock, flags); | 814 | spin_lock_irqsave(&scc->zlock, flags); |
816 | 815 | ||
817 | zport->regs[5] &= ~TxENAB; | ||
818 | zport->regs[3] &= ~RxENABLE; | 816 | zport->regs[3] &= ~RxENABLE; |
819 | write_zsreg(zport, R5, zport->regs[5]); | 817 | write_zsreg(zport, R5, zport->regs[5]); |
820 | write_zsreg(zport, R3, zport->regs[3]); | 818 | write_zsreg(zport, R3, zport->regs[3]); |
@@ -959,6 +957,23 @@ static void zs_set_termios(struct uart_port *uport, struct ktermios *termios, | |||
959 | spin_unlock_irqrestore(&scc->zlock, flags); | 957 | spin_unlock_irqrestore(&scc->zlock, flags); |
960 | } | 958 | } |
961 | 959 | ||
960 | /* | ||
961 | * Hack alert! | ||
962 | * Required solely so that the initial PROM-based console | ||
963 | * works undisturbed in parallel with this one. | ||
964 | */ | ||
965 | static void zs_pm(struct uart_port *uport, unsigned int state, | ||
966 | unsigned int oldstate) | ||
967 | { | ||
968 | struct zs_port *zport = to_zport(uport); | ||
969 | |||
970 | if (state < 3) | ||
971 | zport->regs[5] |= TxENAB; | ||
972 | else | ||
973 | zport->regs[5] &= ~TxENAB; | ||
974 | write_zsreg(zport, R5, zport->regs[5]); | ||
975 | } | ||
976 | |||
962 | 977 | ||
963 | static const char *zs_type(struct uart_port *uport) | 978 | static const char *zs_type(struct uart_port *uport) |
964 | { | 979 | { |
@@ -1041,6 +1056,7 @@ static struct uart_ops zs_ops = { | |||
1041 | .startup = zs_startup, | 1056 | .startup = zs_startup, |
1042 | .shutdown = zs_shutdown, | 1057 | .shutdown = zs_shutdown, |
1043 | .set_termios = zs_set_termios, | 1058 | .set_termios = zs_set_termios, |
1059 | .pm = zs_pm, | ||
1044 | .type = zs_type, | 1060 | .type = zs_type, |
1045 | .release_port = zs_release_port, | 1061 | .release_port = zs_release_port, |
1046 | .request_port = zs_request_port, | 1062 | .request_port = zs_request_port, |
@@ -1190,6 +1206,7 @@ static int __init zs_console_setup(struct console *co, char *options) | |||
1190 | return ret; | 1206 | return ret; |
1191 | 1207 | ||
1192 | zs_reset(zport); | 1208 | zs_reset(zport); |
1209 | zs_pm(uport, 0, -1); | ||
1193 | 1210 | ||
1194 | if (options) | 1211 | if (options) |
1195 | uart_parse_options(options, &baud, &parity, &bits, &flow); | 1212 | uart_parse_options(options, &baud, &parity, &bits, &flow); |