From 38baf0c5f6081367355b969af281432d8b8f4f46 Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Thu, 19 Feb 2026 07:43:35 -0800 Subject: [PATCH] soc/intel/meteorlake: Use common UART device list driver Remove platform-specific uart.c and switch to the common UART device list driver. This eliminates duplicate code. The meteorlake uart.c simply defined uart_devices[] array. The common driver now handles this using the SOC_UART_DEVFN(n) macro defined in pci_devs.h which uses token concatenation to map to platform-specific PCI_DEVFN_UARTn definitions. This commit: - Selects SOC_INTEL_COMMON_FEATURE and SOC_INTEL_COMMON_FEATURE_UART_DEVICES in Kconfig - Removes uart.c and updates Makefile.mk Change-Id: Ic791eaa2521a44aba330e149fb0185094dd9ccf7 Signed-off-by: Jeremy Compostella Reviewed-on: https://review.coreboot.org/c/coreboot/+/91243 Reviewed-by: Kim, Wonkyu Reviewed-by: Werner Zeh Tested-by: build bot (Jenkins) --- src/soc/intel/meteorlake/Kconfig | 2 ++ src/soc/intel/meteorlake/Makefile.mk | 2 -- src/soc/intel/meteorlake/uart.c | 12 ------------ 3 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 src/soc/intel/meteorlake/uart.c diff --git a/src/soc/intel/meteorlake/Kconfig b/src/soc/intel/meteorlake/Kconfig index a0e648a856..b223fa01d2 100644 --- a/src/soc/intel/meteorlake/Kconfig +++ b/src/soc/intel/meteorlake/Kconfig @@ -86,6 +86,8 @@ config SOC_INTEL_METEORLAKE select SOC_INTEL_COMMON_BLOCK_THERMAL_BEHIND_PMC select SOC_INTEL_COMMON_BLOCK_XHCI select SOC_INTEL_COMMON_BLOCK_XHCI_ELOG + select SOC_INTEL_COMMON_FEATURE + select SOC_INTEL_COMMON_FEATURE_UART_DEVICES select SOC_INTEL_COMMON_BASECODE select SOC_INTEL_COMMON_BASECODE_RAMTOP select SOC_INTEL_COMMON_FSP_RESET diff --git a/src/soc/intel/meteorlake/Makefile.mk b/src/soc/intel/meteorlake/Makefile.mk index 2ef53f5395..81be9ff856 100644 --- a/src/soc/intel/meteorlake/Makefile.mk +++ b/src/soc/intel/meteorlake/Makefile.mk @@ -10,7 +10,6 @@ all-y += gspi.c all-y += i2c.c all-y += pmutil.c all-y += spi.c -all-y += uart.c all-y += gpio.c bootblock-y += bootblock/bootblock.c @@ -55,7 +54,6 @@ smm-y += p2sb.c smm-y += pmutil.c smm-y += smihandler.c smm-y += soc_info.c -smm-y += uart.c smm-y += xhci.c CPPFLAGS_common += -I$(src)/soc/intel/meteorlake diff --git a/src/soc/intel/meteorlake/uart.c b/src/soc/intel/meteorlake/uart.c deleted file mode 100644 index 9f549c5ae8..0000000000 --- a/src/soc/intel/meteorlake/uart.c +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include -#include - -const unsigned int uart_devices[] = { - PCI_DEVFN_UART0, - PCI_DEVFN_UART1, - PCI_DEVFN_UART2, -}; - -const int uart_devices_size = ARRAY_SIZE(uart_devices);