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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

Index: work/drivers/firmware/pcdp.c
===================================================================
--- work.orig/drivers/firmware/pcdp.c	2005-07-25 15:04:23.000000000 -0600
+++ work/drivers/firmware/pcdp.c	2005-07-25 15:08:05.000000000 -0600
@@ -25,14 +25,22 @@
 #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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux