soc/intel/elkhartlake: 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 elkhartlake uart.c simply defined uart_devices[] array. The common driver now handles this using the PCI_UART_DEVFNn macro 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: I778faf19128f41509f70d324dd9ccf71d93cab0b Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91247 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
This commit is contained in:
parent
bb95093b8f
commit
7b4fb78e34
4 changed files with 7 additions and 14 deletions
|
|
@ -55,6 +55,8 @@ config SOC_INTEL_ELKHARTLAKE
|
|||
select SOC_INTEL_COMMON_BLOCK_SCS
|
||||
select SOC_INTEL_COMMON_BLOCK_SMM
|
||||
select SOC_INTEL_COMMON_BLOCK_SMM_IO_TRAP
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -45,7 +44,6 @@ smm-y += gpio.c
|
|||
smm-y += p2sb.c
|
||||
smm-y += pmutil.c
|
||||
smm-y += smihandler.c
|
||||
smm-y += uart.c
|
||||
|
||||
verstage-y += gpio.c
|
||||
|
||||
|
|
|
|||
|
|
@ -247,4 +247,9 @@
|
|||
#define PCH_DEV_SPI _PCH_DEV(ESPI, 5)
|
||||
#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
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue