Date: Thu, 25 Apr 2019 02:16:49 +0000 (UTC) From: Rebecca Cran <bcran@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346657 - head/sys/dev/uart Message-ID: <201904250216.x3P2GnUE058770@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bcran Date: Thu Apr 25 02:16:48 2019 New Revision: 346657 URL: https://svnweb.freebsd.org/changeset/base/346657 Log: ACPI SPCR: handle BaudRate=0 From https://github.com/tianocore/edk2-platforms/commit/7d8dc6544c93a5f5a03c83316489ba8700946e9f "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 Modified: head/sys/dev/uart/uart_cpu_arm64.c Modified: head/sys/dev/uart/uart_cpu_arm64.c ============================================================================== --- head/sys/dev/uart/uart_cpu_arm64.c Thu Apr 25 00:58:11 2019 (r346656) +++ head/sys/dev/uart/uart_cpu_arm64.c Thu Apr 25 02:16:48 2019 (r346657) @@ -128,6 +128,13 @@ uart_cpu_acpi_probe(struct uart_class **classp, bus_sp 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904250216.x3P2GnUE058770>