提交 11be00cb 编写于 作者: B Bjorn Helgaas 提交者: Linus Torvalds

[PATCH] PCDP: if PCDP contains parity information, use it

If the PCDP supplies parity, use it (only none/even/odd supported), and
don't append parity/stop bit arguments unless baud is present.
Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 8b378def
...@@ -25,14 +25,22 @@ setup_serial_console(struct pcdp_uart *uart) ...@@ -25,14 +25,22 @@ setup_serial_console(struct pcdp_uart *uart)
#ifdef CONFIG_SERIAL_8250_CONSOLE #ifdef CONFIG_SERIAL_8250_CONSOLE
int mmio; int mmio;
static char options[64], *p = options; static char options[64], *p = options;
char parity;
mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY); mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY);
p += sprintf(p, "console=uart,%s,0x%lx", p += sprintf(p, "console=uart,%s,0x%lx",
mmio ? "mmio" : "io", uart->addr.address); mmio ? "mmio" : "io", uart->addr.address);
if (uart->baud) if (uart->baud) {
p += sprintf(p, ",%lu", uart->baud); p += sprintf(p, ",%lu", uart->baud);
if (uart->bits) if (uart->bits) {
p += sprintf(p, "n%d", uart->bits); switch (uart->parity) {
case 0x2: parity = 'e'; break;
case 0x3: parity = 'o'; break;
default: parity = 'n';
}
p += sprintf(p, "%c%d", parity, uart->bits);
}
}
return early_serial_console_init(options); return early_serial_console_init(options);
#else #else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册