Commit f3efa592 authored by Liming Wang's avatar Liming Wang Committed by Will Deacon
Browse files

kvm tools: unify all serials' registers with the first serial



To make all serials work well, unify value of the last three
serials' registers with the first serial. Otherwise, using ttyS1,
ttyS2, ttyS3 as console will slow the output.

Signed-off-by: default avatarLiming Wang <walimisdev@gmail.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 8d7b77f6
......@@ -31,6 +31,12 @@ struct serial8250_device {
u8 scr;
};
#define SERIAL_REGS_SETTING \
.iir = UART_IIR_NO_INT, \
.lsr = UART_LSR_TEMT | UART_LSR_THRE, \
.msr = UART_MSR_DCD | UART_MSR_DSR | UART_MSR_CTS, \
.mcr = UART_MCR_OUT2,
static struct serial8250_device devices[] = {
/* ttyS0 */
[0] = {
......@@ -39,10 +45,7 @@ static struct serial8250_device devices[] = {
.iobase = 0x3f8,
.irq = 4,
.iir = UART_IIR_NO_INT,
.lsr = UART_LSR_TEMT | UART_LSR_THRE,
.msr = UART_MSR_DCD | UART_MSR_DSR | UART_MSR_CTS,
.mcr = UART_MCR_OUT2,
SERIAL_REGS_SETTING
},
/* ttyS1 */
[1] = {
......@@ -51,7 +54,7 @@ static struct serial8250_device devices[] = {
.iobase = 0x2f8,
.irq = 3,
.iir = UART_IIR_NO_INT,
SERIAL_REGS_SETTING
},
/* ttyS2 */
[2] = {
......@@ -60,7 +63,7 @@ static struct serial8250_device devices[] = {
.iobase = 0x3e8,
.irq = 4,
.iir = UART_IIR_NO_INT,
SERIAL_REGS_SETTING
},
/* ttyS3 */
[3] = {
......@@ -69,7 +72,7 @@ static struct serial8250_device devices[] = {
.iobase = 0x2e8,
.irq = 3,
.iir = UART_IIR_NO_INT,
SERIAL_REGS_SETTING
},
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment