From 326e33b82d3bdb182da334e60b044574d5edb472 Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Thu, 19 Feb 2026 07:43:35 -0800 Subject: [PATCH] soc/intel/pantherlake: 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 pantherlake uart.c simply defined uart_devices[] array. The common driver now handles this using the PCI_UART_DEVFN macro defined in pci_devs.h. 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: I59443ece21bc45c8b6986fdd2bc24dd9ccf7a543 Signed-off-by: Jeremy Compostella Reviewed-on: https://review.coreboot.org/c/coreboot/+/91244 Reviewed-by: Kim, Wonkyu Reviewed-by: Pranava Y N Tested-by: build bot (Jenkins) --- src/soc/intel/pantherlake/Kconfig | 2 ++ src/soc/intel/pantherlake/Makefile.mk | 2 -- src/soc/intel/pantherlake/uart.c | 12 ------------ 3 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 src/soc/intel/pantherlake/uart.c diff --git a/src/soc/intel/pantherlake/Kconfig b/src/soc/intel/pantherlake/Kconfig index 92397037af..a67b2410ad 100644 --- a/src/soc/intel/pantherlake/Kconfig +++ b/src/soc/intel/pantherlake/Kconfig @@ -96,6 +96,8 @@ config SOC_INTEL_PANTHERLAKE_BASE select SOC_INTEL_COMMON_BLOCK_TRACEHUB 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_FSP_RESET select SOC_INTEL_COMMON_PCH_CLIENT select SOC_INTEL_COMMON_RESET diff --git a/src/soc/intel/pantherlake/Makefile.mk b/src/soc/intel/pantherlake/Makefile.mk index ab118c5055..fd9760a965 100644 --- a/src/soc/intel/pantherlake/Makefile.mk +++ b/src/soc/intel/pantherlake/Makefile.mk @@ -11,7 +11,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 @@ -53,7 +52,6 @@ smm-y += gpio.c smm-y += p2sb.c smm-y += pmutil.c smm-y += smihandler.c -smm-y += uart.c smm-y += xhci.c CPPFLAGS_common += -I$(src)/soc/intel/pantherlake CPPFLAGS_common += -I$(src)/soc/intel/pantherlake/include diff --git a/src/soc/intel/pantherlake/uart.c b/src/soc/intel/pantherlake/uart.c deleted file mode 100644 index 9f549c5ae8..0000000000 --- a/src/soc/intel/pantherlake/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);