git: 5db3699be68f - main - Kill ignore regshft flag
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 15 Jan 2025 02:26:33 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=5db3699be68f3a49d96d58c78af6f12e2dc1b38b
commit 5db3699be68f3a49d96d58c78af6f12e2dc1b38b
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-01-15 02:21:26 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-01-15 02:24:36 +0000
Kill ignore regshft flag
This flag was introduced to ignore bad firmware values. These were
present in older versions of EDK-II that many devices (both Ampere and
Amazon) used. QEMU also used this value, but fixed it. But since it's
tied to the firmware bug not the device name ID it doesn't make sense to
have it flagged there.
Sponsored by: Netflix
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D47947
---
sys/dev/uart/uart_bus.h | 1 -
sys/dev/uart/uart_cpu_acpi.c | 12 ------------
sys/dev/uart/uart_dev_pl011.c | 6 +++---
3 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/sys/dev/uart/uart_bus.h b/sys/dev/uart/uart_bus.h
index ccf8ad06a8ec..a605e3d20be7 100644
--- a/sys/dev/uart/uart_bus.h
+++ b/sys/dev/uart/uart_bus.h
@@ -56,7 +56,6 @@
/* UART quirk flags */
#define UART_F_BUSY_DETECT 0x1
-#define UART_F_IGNORE_SPCR_REGSHFT 0x2
/*
* UART class & instance (=softc)
diff --git a/sys/dev/uart/uart_cpu_acpi.c b/sys/dev/uart/uart_cpu_acpi.c
index ce00a09fee33..7382c47a8db6 100644
--- a/sys/dev/uart/uart_cpu_acpi.c
+++ b/sys/dev/uart/uart_cpu_acpi.c
@@ -221,12 +221,6 @@ uart_cpu_acpi_spcr(int devtype, struct uart_devinfo *di)
di->pci_info.device = spcr->PciDeviceId;
}
- /* Apply device tweaks. */
- if ((cd->cd_quirks & UART_F_IGNORE_SPCR_REGSHFT) ==
- UART_F_IGNORE_SPCR_REGSHFT) {
- di->bas.regshft = cd->cd_regshft;
- }
-
/* Create a bus space handle. */
error = bus_space_map(di->bas.bst, spcr->SerialPort.Address,
uart_getrange(class), 0, &di->bas.bsh);
@@ -296,12 +290,6 @@ next:
/* XXX: Find the correct value */
di->baudrate = 115200;
- /* Apply device tweaks. */
- if ((cd->cd_quirks & UART_F_IGNORE_SPCR_REGSHFT) ==
- UART_F_IGNORE_SPCR_REGSHFT) {
- di->bas.regshft = cd->cd_regshft;
- }
-
/* Create a bus space handle. */
error = bus_space_map(di->bas.bst, base_address->Address,
uart_getrange(class), 0, &di->bas.bsh);
diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c
index e7a2ff7a85f1..a0d5a5b1c7e2 100644
--- a/sys/dev/uart/uart_dev_pl011.c
+++ b/sys/dev/uart/uart_dev_pl011.c
@@ -392,9 +392,9 @@ UART_FDT_CLASS_AND_DEVICE(fdt_compat_data);
#ifdef DEV_ACPI
static struct acpi_uart_compat_data acpi_compat_data[] = {
- {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_PL011, 2, 0, 0, UART_F_IGNORE_SPCR_REGSHFT, "uart pl011"},
- {"ARMHB000", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC, 2, 0, 0, UART_F_IGNORE_SPCR_REGSHFT, "uart pl011"},
- {"ARMHB000", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_32BIT, 2, 0, 0, UART_F_IGNORE_SPCR_REGSHFT, "uart pl011"},
+ {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_PL011, 2, 0, 0, 0, "uart pl011"},
+ {"ARMHB000", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC, 2, 0, 0, 0, "uart pl011"},
+ {"ARMHB000", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_32BIT, 2, 0, 0, 0, "uart pl011"},
{NULL, NULL, 0, 0, 0, 0, 0, NULL},
};
UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data);