diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2005-07-28 01:07:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-28 08:39:02 -0700 |
commit | 11be00cba6be114f861123cfc6779f195a615d22 (patch) | |
tree | eb0a9beef23463d18d8d440c8fba9cbbb1f986b3 | |
parent | 8b378def5a386c4a7f15b51ed79802badb9f5a70 (diff) | |
download | op-kernel-dev-11be00cba6be114f861123cfc6779f195a615d22.zip op-kernel-dev-11be00cba6be114f861123cfc6779f195a615d22.tar.gz |
[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>
-rw-r--r-- | drivers/firmware/pcdp.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c index 53c95c0..ae1fb45 100644 --- a/drivers/firmware/pcdp.c +++ b/drivers/firmware/pcdp.c @@ -25,14 +25,22 @@ setup_serial_console(struct pcdp_uart *uart) #ifdef CONFIG_SERIAL_8250_CONSOLE int mmio; static char options[64], *p = options; + char parity; mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY); p += sprintf(p, "console=uart,%s,0x%lx", mmio ? "mmio" : "io", uart->addr.address); - if (uart->baud) + if (uart->baud) { p += sprintf(p, ",%lu", uart->baud); - if (uart->bits) - p += sprintf(p, "n%d", uart->bits); + if (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); #else |