aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/pcdp.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2005-07-28 04:07:39 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-28 11:39:02 -0400
commit11be00cba6be114f861123cfc6779f195a615d22 (patch)
treeeb0a9beef23463d18d8d440c8fba9cbbb1f986b3 /drivers/firmware/pcdp.c
parent8b378def5a386c4a7f15b51ed79802badb9f5a70 (diff)
[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>
Diffstat (limited to 'drivers/firmware/pcdp.c')
-rw-r--r--drivers/firmware/pcdp.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c
index 53c95c0bbf46..ae1fb45dbb40 100644
--- a/drivers/firmware/pcdp.c
+++ b/drivers/firmware/pcdp.c
@@ -25,14 +25,22 @@ setup_serial_console(struct pcdp_uart *uart)
25#ifdef CONFIG_SERIAL_8250_CONSOLE 25#ifdef CONFIG_SERIAL_8250_CONSOLE
26 int mmio; 26 int mmio;
27 static char options[64], *p = options; 27 static char options[64], *p = options;
28 char parity;
28 29
29 mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY); 30 mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY);
30 p += sprintf(p, "console=uart,%s,0x%lx", 31 p += sprintf(p, "console=uart,%s,0x%lx",
31 mmio ? "mmio" : "io", uart->addr.address); 32 mmio ? "mmio" : "io", uart->addr.address);
32 if (uart->baud) 33 if (uart->baud) {
33 p += sprintf(p, ",%lu", uart->baud); 34 p += sprintf(p, ",%lu", uart->baud);
34 if (uart->bits) 35 if (uart->bits) {
35 p += sprintf(p, "n%d", 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 return early_serial_console_init(options); 45 return early_serial_console_init(options);
38#else 46#else