Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Bjorn Helgaas and committed by
Linus Torvalds
11be00cb 8b378def

+11 -3
+11 -3
drivers/firmware/pcdp.c
··· 25 25 #ifdef CONFIG_SERIAL_8250_CONSOLE 26 26 int mmio; 27 27 static char options[64], *p = options; 28 + char parity; 28 29 29 30 mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY); 30 31 p += sprintf(p, "console=uart,%s,0x%lx", 31 32 mmio ? "mmio" : "io", uart->addr.address); 32 - if (uart->baud) 33 + if (uart->baud) { 33 34 p += sprintf(p, ",%lu", uart->baud); 34 - if (uart->bits) 35 - p += sprintf(p, "n%d", uart->bits); 35 + if (uart->bits) { 36 + switch (uart->parity) { 37 + case 0x2: parity = 'e'; break; 38 + case 0x3: parity = 'o'; break; 39 + default: parity = 'n'; 40 + } 41 + p += sprintf(p, "%c%d", parity, uart->bits); 42 + } 43 + } 36 44 37 45 return early_serial_console_init(options); 38 46 #else