From d9ad49c25035f1ded97571ef3d23d092fe8a711d Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Thu, 16 Sep 2021 19:32:57 +0200 Subject: [PATCH] mb/intel/adlrvp: Rework Kconfig Rework Kconfig file that each variant has its own config option with their specific selects / configuration and move common selects to `BOARD_INTEL_ADLRVP_COMMON`, which is used as base for each variant. Also, move selects from Kconfig.name to Kconfig that the configuration is at one place and not distributed over two files. Built each variant with `BUILD_TIMELESS=1` and all generated coreboot.rom files remain identical. Excluded the .config file by disabling `INCLUDE_CONFIG_FILE` to make this reproducible. Change-Id: If68c118f22579cc0a3db570119798f0f535f9804 Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/56221 Reviewed-by: Nico Huber Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/mainboard/intel/adlrvp/Kconfig | 70 +++++++++++++++++-------- src/mainboard/intel/adlrvp/Kconfig.name | 10 ---- 2 files changed, 49 insertions(+), 31 deletions(-) diff --git a/src/mainboard/intel/adlrvp/Kconfig b/src/mainboard/intel/adlrvp/Kconfig index c62adbe724..2b78515776 100644 --- a/src/mainboard/intel/adlrvp/Kconfig +++ b/src/mainboard/intel/adlrvp/Kconfig @@ -1,33 +1,61 @@ -if BOARD_INTEL_ADLRVP_P || BOARD_INTEL_ADLRVP_P_EXT_EC || BOARD_INTEL_ADLRVP_P_MCHP || BOARD_INTEL_ADLRVP_M || BOARD_INTEL_ADLRVP_M_EXT_EC - -config BOARD_SPECIFIC_OPTIONS - def_bool y +config BOARD_INTEL_ADLRVP_COMMON + def_bool n select BOARD_ROMSIZE_KB_32768 - select HAVE_ACPI_RESUME - select HAVE_ACPI_TABLES - select MAINBOARD_HAS_CHROMEOS - select DRIVERS_I2C_HID select DRIVERS_I2C_GENERIC + select DRIVERS_I2C_HID + select DRIVERS_I2C_MAX98373 select DRIVERS_INTEL_DPTF select DRIVERS_INTEL_MIPI_CAMERA - select DRIVERS_INTEL_PMC if BOARD_INTEL_ADLRVP_P_EXT_EC || BOARD_INTEL_ADLRVP_M_EXT_EC || BOARD_INTEL_ADLRVP_P_MCHP select DRIVERS_INTEL_SOUNDWIRE - select DRIVERS_USB_ACPI - select DRIVERS_SPI_ACPI - select EC_GOOGLE_CHROMEEC_ACPI_MEMMAP if BOARD_INTEL_ADLRVP_P_MCHP - select SOC_INTEL_ALDERLAKE - select SOC_INTEL_ALDERLAKE_PCH_M if BOARD_INTEL_ADLRVP_M || BOARD_INTEL_ADLRVP_M_EXT_EC - select HAVE_SPD_IN_CBFS select DRIVERS_SOUNDWIRE_ALC711 + select DRIVERS_SPI_ACPI + select DRIVERS_USB_ACPI + select HAVE_ACPI_RESUME + select HAVE_ACPI_TABLES + select HAVE_SPD_IN_CBFS + select MAINBOARD_HAS_CHROMEOS + select SOC_INTEL_ALDERLAKE select SOC_INTEL_COMMON_BLOCK_IPU select SOC_INTEL_CSE_LITE_SKU - select DRIVERS_I2C_MAX98373 - select FW_CONFIG if BOARD_INTEL_ADLRVP_M_EXT_EC - select FW_CONFIG_SOURCE_CHROMEEC_CBI if BOARD_INTEL_ADLRVP_M_EXT_EC - select MAINBOARD_HAS_TPM2 if BOARD_INTEL_ADLRVP_M_EXT_EC - select MAINBOARD_HAS_SPI_TPM_CR50 if BOARD_INTEL_ADLRVP_M_EXT_EC select SOC_INTEL_ENABLE_USB4_PCIE_RESOURCES - select SPI_TPM if BOARD_INTEL_ADLRVP_M_EXT_EC + +config BOARD_INTEL_ADLRVP_P + select BOARD_INTEL_ADLRVP_COMMON + select DRIVERS_UART_8250IO + select MAINBOARD_USES_IFD_EC_REGION + +config BOARD_INTEL_ADLRVP_P_EXT_EC + select BOARD_INTEL_ADLRVP_COMMON + select DRIVERS_INTEL_PMC + select INTEL_LPSS_UART_FOR_CONSOLE + +config BOARD_INTEL_ADLRVP_P_MCHP + select BOARD_INTEL_ADLRVP_COMMON + select DRIVERS_INTEL_MIPI_CAMERA + select DRIVERS_INTEL_PMC + select EC_GOOGLE_CHROMEEC_ACPI_MEMMAP + select EC_GOOGLE_CHROMEEC_MEC + select INTEL_LPSS_UART_FOR_CONSOLE + select SOC_INTEL_COMMON_BLOCK_IPU + +config BOARD_INTEL_ADLRVP_M + select BOARD_INTEL_ADLRVP_COMMON + select DRIVERS_UART_8250IO + select MAINBOARD_USES_IFD_EC_REGION + select SOC_INTEL_ALDERLAKE_PCH_M + +config BOARD_INTEL_ADLRVP_M_EXT_EC + select BOARD_INTEL_ADLRVP_COMMON + select DRIVERS_INTEL_PMC + select FW_CONFIG + select FW_CONFIG_SOURCE_CHROMEEC_CBI + select INTEL_LPSS_UART_FOR_CONSOLE + select MAINBOARD_HAS_SPI_TPM_CR50 + select MAINBOARD_HAS_TPM2 + select SOC_INTEL_ALDERLAKE_PCH_M + select SPI_TPM + +if BOARD_INTEL_ADLRVP_COMMON config CHROMEOS select GBB_FLAG_FORCE_DEV_SWITCH_ON diff --git a/src/mainboard/intel/adlrvp/Kconfig.name b/src/mainboard/intel/adlrvp/Kconfig.name index af6ac480a5..7ee2c13ef9 100644 --- a/src/mainboard/intel/adlrvp/Kconfig.name +++ b/src/mainboard/intel/adlrvp/Kconfig.name @@ -1,24 +1,14 @@ config BOARD_INTEL_ADLRVP_P bool "Alderlake-P RVP" - select DRIVERS_UART_8250IO - select MAINBOARD_USES_IFD_EC_REGION config BOARD_INTEL_ADLRVP_P_EXT_EC bool "Alderlake-P RVP with Chrome EC" - select INTEL_LPSS_UART_FOR_CONSOLE config BOARD_INTEL_ADLRVP_P_MCHP bool "Alderlake-P RVP with Microchip EC" - select INTEL_LPSS_UART_FOR_CONSOLE - select DRIVERS_INTEL_MIPI_CAMERA - select SOC_INTEL_COMMON_BLOCK_IPU - select EC_GOOGLE_CHROMEEC_MEC config BOARD_INTEL_ADLRVP_M bool "Alderlake-M RVP" - select DRIVERS_UART_8250IO - select MAINBOARD_USES_IFD_EC_REGION config BOARD_INTEL_ADLRVP_M_EXT_EC bool "Alderlake-M RVP with Chrome EC" - select INTEL_LPSS_UART_FOR_CONSOLE