diff options
| author | Warner Losh <imp@FreeBSD.org> | 2024-10-14 21:57:25 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2024-10-14 22:03:58 +0000 |
| commit | b2fd259edd18af1fe35912bdb602bbe907dbbbcb (patch) | |
| tree | 74906ccea509647342638deb5a1bec6aa5398df0 /sys/dev/uart/uart_cpu_acpi.c | |
| parent | 2be22860375440641f6e57b03724fe38b87b0dd1 (diff) | |
Diffstat (limited to 'sys/dev/uart/uart_cpu_acpi.c')
| -rw-r--r-- | sys/dev/uart/uart_cpu_acpi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/uart/uart_cpu_acpi.c b/sys/dev/uart/uart_cpu_acpi.c index ae22a9822aa6..816738ec31d5 100644 --- a/sys/dev/uart/uart_cpu_acpi.c +++ b/sys/dev/uart/uart_cpu_acpi.c @@ -189,6 +189,14 @@ uart_cpu_acpi_spcr(int devtype, struct uart_devinfo *di) (int)spcr->BaudRate); goto out; } + /* + * If no rclk is set, then we will assume the BIOS has configured the + * hardware at the stated baudrate, so we can use it to guess the rclk + * relatively accurately, so make a note for later. + */ + if (di->bas.rclk == 0) + di->bas.rclk_guess = 1; + if (spcr->PciVendorId != PCIV_INVALID && spcr->PciDeviceId != PCIV_INVALID) { di->pci_info.vendor = spcr->PciVendorId; |
