mb/amd/birman: Use common option for variant configuration

When a variant setup is used, checking for each variant in order to do
the mainboard configuration is quite painful. Thus, move the selects
from BOARD_SPECIFIC_OPTIONS, which is enabled by default when a variant
is chosen, out to a common option, which is disabled by default but
selected by the variants.

So in order to enter that config block, it's only needed to check if
that common option is enabled and not for each variant. It's also a very
common scheme now.

Change-Id: I4ed889ce78a0d7cd088e05d0f4b7fbbc89153860
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78975
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
This commit is contained in:
Felix Singer 2023-11-09 22:27:30 +01:00 committed by Felix Singer
parent 3a36daf873
commit 35a30de7af
1 changed files with 12 additions and 10 deletions

View File

@ -1,15 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
config BOARD_AMD_BIRMAN_PHOENIX
select SOC_AMD_PHOENIX
config BOARD_AMD_BIRMAN_GLINDA
select SOC_AMD_GLINDA
if BOARD_AMD_BIRMAN_GLINDA || BOARD_AMD_BIRMAN_PHOENIX
config BOARD_SPECIFIC_OPTIONS
def_bool y
config BOARD_AMD_BIRMAN_COMMON
def_bool n
select BOARD_ROMSIZE_KB_16384 # Birman actually has a 32MiB ROM
select EC_ACPI
select SOC_AMD_COMMON_BLOCK_USE_ESPI if !SOC_AMD_COMMON_BLOCK_SIMNOW_BUILD
@ -23,6 +15,16 @@ config BOARD_SPECIFIC_OPTIONS
select SOC_AMD_COMMON_BLOCK_SIMNOW_SUPPORTED
select SPI_FLASH_EXIT_4_BYTE_ADDR_MODE
config BOARD_AMD_BIRMAN_PHOENIX
select BOARD_AMD_BIRMAN_COMMON
select SOC_AMD_PHOENIX
config BOARD_AMD_BIRMAN_GLINDA
select BOARD_AMD_BIRMAN_COMMON
select SOC_AMD_GLINDA
if BOARD_AMD_BIRMAN_COMMON
config FMDFILE
default "src/mainboard/amd/birman/chromeos_glinda.fmd" if CHROMEOS && BOARD_AMD_BIRMAN_GLINDA
default "src/mainboard/amd/birman/chromeos_phoenix.fmd" if CHROMEOS && BOARD_AMD_BIRMAN_PHOENIX