aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/pcdp.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2005-06-23 03:10:16 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 12:45:32 -0400
commit280dedb8d64ccfe1166ae03d3b254fc3b65de6a5 (patch)
tree2037bacf2eb32833a3b8b16701b906692ecf7b9b /drivers/firmware/pcdp.c
parentbb93e3a52f8db7210258a1a2134cced0b78a46e1 (diff)
[PATCH] PCDP: handle tables that don't supply baud rate
The HCDP specs (i.e., PCDP revision < 3) allow zero as a default value for baud rate and data bits. So if firmware doesn't supply them, let early_serial_console_init() probe for them rather than telling it the baud rate is zero. Also, update the URL for the PCDP spec. 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.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c
index df1b721154d2..839b44a7e08b 100644
--- a/drivers/firmware/pcdp.c
+++ b/drivers/firmware/pcdp.c
@@ -23,12 +23,15 @@ setup_serial_console(struct pcdp_uart *uart)
23{ 23{
24#ifdef CONFIG_SERIAL_8250_CONSOLE 24#ifdef CONFIG_SERIAL_8250_CONSOLE
25 int mmio; 25 int mmio;
26 static char options[64]; 26 static char options[64], *p = options;
27 27
28 mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY); 28 mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY);
29 snprintf(options, sizeof(options), "console=uart,%s,0x%lx,%lun%d", 29 p += sprintf(p, "console=uart,%s,0x%lx",
30 mmio ? "mmio" : "io", uart->addr.address, uart->baud, 30 mmio ? "mmio" : "io", uart->addr.address);
31 uart->bits ? uart->bits : 8); 31 if (uart->baud)
32 p += sprintf(p, ",%lu", uart->baud);
33 if (uart->bits)
34 p += sprintf(p, "n%d", uart->bits);
32 35
33 return early_serial_console_init(options); 36 return early_serial_console_init(options);
34#else 37#else