soc/intel/tigerlake: 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 tigerlake uart.c simply defined uart_devices[] array. The common
driver now handles this using the PCI_UART_DEVFNn macros defined in
pci_devs.h.

This commit:
- Adds PCI_DEVFN_UART* aliases pointing to PCH_DEVFN_UART* for naming
  consistency with common code
- Selects SOC_INTEL_COMMON_FEATURE and
  SOC_INTEL_COMMON_FEATURE_UART_DEVICES in Kconfig
- Removes uart.c and updates Makefile.mk

Change-Id: I9520bd3f4dd9ccf777e34c79a8c8237adb8b0fed
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91245
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Jeremy Compostella 2026-02-19 07:43:36 -08:00 committed by Matt DeVillier
commit 61dc1e04e0
4 changed files with 7 additions and 20 deletions

View file

@ -72,6 +72,8 @@ config SOC_INTEL_TIGERLAKE
select SOC_INTEL_COMMON_BLOCK_USB4_PCIE
select SOC_INTEL_COMMON_BLOCK_USB4_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

View file

@ -10,7 +10,6 @@ all-y += gspi.c
all-y += i2c.c
all-y += pmutil.c
all-y += spi.c
all-y += uart.c
bootblock-y += bootblock/bootblock.c
bootblock-y += bootblock/pch.c
@ -47,7 +46,6 @@ ramstage-$(CONFIG_SOC_INTEL_CRASHLOG) += crashlog_lib.c
smm-y += p2sb.c
smm-y += pmutil.c
smm-y += smihandler.c
smm-y += uart.c
smm-y += elog.c
smm-y += xhci.c

View file

@ -245,4 +245,9 @@
#define PCH_DEV_GBE _PCH_DEV(ESPI, 6)
#define PCH_DEV_TRACEHUB _PCH_DEV(ESPI, 7)
/* for common code */
#define PCI_DEVFN_UART0 PCH_DEVFN_UART0
#define PCI_DEVFN_UART1 PCH_DEVFN_UART1
#define PCI_DEVFN_UART2 PCH_DEVFN_UART2
#endif

View file

@ -1,18 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* This file is created based on Intel Tiger Lake Processor PCH Datasheet
* Document number: 575857
* Chapter number: 9
*/
#include <commonlib/helpers.h>
#include <soc/pci_devs.h>
const unsigned int uart_devices[] = {
PCH_DEVFN_UART0,
PCH_DEVFN_UART1,
PCH_DEVFN_UART2,
};
const int uart_devices_size = ARRAY_SIZE(uart_devices);