ACPI SPCR: handle BaudRate=0
From 7d8dc6544c
"The mcbin (and likely others) have a nonstandard uart clock. This means
that the earlycon programming will incorrectly set the baud rate if it is
specified. The way around this is to tell the kernel to continue using the
preprogrammed baud rate. This is done by setting the baud to 0."
Our drivers (uart_dev_ns8250) do respect zero, but SPCR would error. Let's
not error.
Submitted by: Greg V <greg@unrelenting.technology>
Reviewed by: mw, imp, bcran
Differential Revision: https://reviews.freebsd.org/D19914
This commit is contained in:
parent
759979768d
commit
fd7e4afa3e
@ -128,6 +128,13 @@ uart_cpu_acpi_probe(struct uart_class **classp, bus_space_tag_t *bst,
|
||||
goto out;
|
||||
|
||||
switch(spcr->BaudRate) {
|
||||
case 0:
|
||||
/*
|
||||
* A BaudRate of 0 is a special value which means not to
|
||||
* change the rate that's already programmed.
|
||||
*/
|
||||
*baud = 0;
|
||||
break;
|
||||
case 3:
|
||||
*baud = 9600;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user