Index: sys/dev/uart/uart_bus_acpi.c =================================================================== --- sys/dev/uart/uart_bus_acpi.c +++ sys/dev/uart/uart_bus_acpi.c @@ -43,11 +43,9 @@ #include #include -#ifdef __aarch64__ #include #include #include -#endif static int uart_acpi_probe(device_t dev); @@ -66,21 +64,6 @@ sizeof(struct uart_softc), }; -#if defined(__i386__) || defined(__amd64__) -static struct isa_pnp_id acpi_ns8250_ids[] = { - {0x0005d041, "Standard PC COM port"}, /* PNP0500 */ - {0x0105d041, "16550A-compatible COM port"}, /* PNP0501 */ - {0x0205d041, "Multiport serial device (non-intelligent 16550)"}, /* PNP0502 */ - {0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */ - {0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */ - {0x04f0235c, "Wacom Tablet PC Screen"}, /* WACF004 */ - {0x0ef0235c, "Wacom Tablet PC Screen 00e"}, /* WACF00e */ - {0xe502aa1a, "Wacom Tablet at FuS Lifebook T"}, /* FUJ02E5 */ - {0} -}; -#endif - -#ifdef __aarch64__ static struct uart_class * uart_acpi_find_device(device_t dev) { @@ -98,7 +81,6 @@ return (NULL); } -#endif static int uart_acpi_probe(device_t dev) @@ -106,18 +88,8 @@ struct uart_softc *sc; sc = device_get_softc(dev); - -#if defined(__i386__) || defined(__amd64__) - if (!ISA_PNP_PROBE(device_get_parent(dev), dev, acpi_ns8250_ids)) { - sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0, 0, 0)); - } - - /* Add checks for non-ns8250 IDs here. */ -#elif defined(__aarch64__) if ((sc->sc_class = uart_acpi_find_device(dev)) != NULL) return (uart_bus_probe(dev, 2, 0, 0, 0, 0)); -#endif return (ENXIO); } Index: sys/dev/uart/uart_dev_ns8250.c =================================================================== --- sys/dev/uart/uart_dev_ns8250.c +++ sys/dev/uart/uart_dev_ns8250.c @@ -61,6 +61,32 @@ #define DEFAULT_RCLK 1843200 +#ifdef DEV_ACPI +static struct acpi_uart_compat_data acpi_compat_data[] = { + {"PNP0500", &uart_ns8250_class, 0}, + {"PNP0501", &uart_ns8250_class, 0}, + {"PNP0502", &uart_ns8250_class, 0}, + {"PNP0510", &uart_ns8250_class, 0}, + {"PNP0511", &uart_ns8250_class, 0}, + {"WACF004", &uart_ns8250_class, 0}, + {"WACF00E", &uart_ns8250_class, 0}, + {"FUJ02E5", &uart_ns8250_class, 0}, + {NULL, NULL, 0}, +#if 0 + {0x0005d041, "Standard PC COM port"}, /* PNP0500 */ + {0x0105d041, "16550A-compatible COM port"}, /* PNP0501 */ + {0x0205d041, "Multiport serial device (non-intelligent 16550)"}, /* PNP0502 */ + {0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */ + {0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */ + {0x04f0235c, "Wacom Tablet PC Screen"}, /* WACF004 */ + {0x0ef0235c, "Wacom Tablet PC Screen 00e"}, /* WACF00e */ + {0xe502aa1a, "Wacom Tablet at FuS Lifebook T"}, /* FUJ02E5 */ + {0} +#endif +}; +UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data); +#endif + /* * Set the default baudrate tolerance to 3.0%. * Index: sys/modules/uart/Makefile =================================================================== --- sys/modules/uart/Makefile +++ sys/modules/uart/Makefile @@ -37,6 +37,6 @@ SRCS+= acpi_if.h bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} \ pci_if.h \ power_if.h pccarddevs.h serdev_if.h -SRCS+= opt_platform.h opt_uart.h +SRCS+= opt_platform.h opt_uart.h opt_acpi.h .include