mb/google/hatch: Split Kconfigs into BASEBOARD_HATCH and BASEBOARD_PUFF

mb/google/hatch supports two different reference platforms - Hatch and
Puff. This change adds Kconfigs BOARD_GOOGLE_BASEBOARD_PUFF in
addition to BOARD_GOOGLE_BASEBOARD_HATCH to better organize the
Kconfig selections and reduce redundancy. In addition to this, a new
config BOARD_GOOGLE_HATCH_COMMON is added that selects all the common
configs for both baseboards.

TEST=Verified using abuild --timeless option that all hatch variants
generate the same coreboot.rom image with and without this change.

Change-Id: I46f8b2ed924c10228fa55e5168bf4fe6b41ec36c
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41660
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Furquan Shaikh 2020-05-21 23:53:07 -07:00 committed by Patrick Georgi
parent 45761c5e99
commit 1fcb238d62
2 changed files with 36 additions and 44 deletions

View File

@ -1,5 +1,21 @@
config BOARD_GOOGLE_BASEBOARD_HATCH config BOARD_GOOGLE_BASEBOARD_HATCH
def_bool n
select BOARD_GOOGLE_HATCH_COMMON
select RT8168_GET_MAC_FROM_VPD
select RT8168_SET_LED_MODE
select SYSTEM_TYPE_LAPTOP
select VBOOT_LID_SWITCH
config BOARD_GOOGLE_BASEBOARD_PUFF
def_bool n
select BOARD_GOOGLE_HATCH_COMMON
select RT8168_GET_MAC_FROM_VPD
select RT8168_SET_LED_MODE
select ROMSTAGE_SPD_SMBUS
select SPD_READ_BY_WORD
config BOARD_GOOGLE_HATCH_COMMON
def_bool n def_bool n
select DRIVERS_GENERIC_GPIO_KEYS select DRIVERS_GENERIC_GPIO_KEYS
select DRIVERS_GENERIC_MAX98357A select DRIVERS_GENERIC_MAX98357A
@ -22,15 +38,8 @@ config BOARD_GOOGLE_BASEBOARD_HATCH
select MAINBOARD_HAS_TPM2 select MAINBOARD_HAS_TPM2
select MB_HAS_ACTIVE_HIGH_SD_PWR_ENABLE select MB_HAS_ACTIVE_HIGH_SD_PWR_ENABLE
select SOC_INTEL_COMETLAKE select SOC_INTEL_COMETLAKE
select RT8168_GET_MAC_FROM_VPD
select RT8168_SET_LED_MODE
config BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP if BOARD_GOOGLE_HATCH_COMMON
select BOARD_GOOGLE_BASEBOARD_HATCH
select SYSTEM_TYPE_LAPTOP
def_bool n
if BOARD_GOOGLE_BASEBOARD_HATCH
config CHROMEOS config CHROMEOS
bool bool
@ -157,11 +166,4 @@ config VBOOT
select MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN select MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN
select VBOOT_EARLY_EC_SYNC select VBOOT_EARLY_EC_SYNC
endif # BOARD_GOOGLE_BASEBOARD_HATCH endif # BOARD_GOOGLE_HATCH_COMMON
if BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
config VBOOT
select VBOOT_LID_SWITCH
endif # BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP

View File

@ -2,114 +2,104 @@ comment "Hatch"
config BOARD_GOOGLE_AKEMI config BOARD_GOOGLE_AKEMI
bool "-> Akemi" bool "-> Akemi"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_DRATINI config BOARD_GOOGLE_DRATINI
bool "-> Dratini" bool "-> Dratini"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_DUFFY_LEGACY config BOARD_GOOGLE_DUFFY_LEGACY
bool "-> Duffy Legacy (32MB)" bool "-> Duffy Legacy (32MB)"
select BOARD_GOOGLE_BASEBOARD_HATCH select BOARD_GOOGLE_BASEBOARD_PUFF
select BOARD_ROMSIZE_KB_32768 select BOARD_ROMSIZE_KB_32768
select ROMSTAGE_SPD_SMBUS
select SPD_READ_BY_WORD
select VBOOT_EC_EFS select VBOOT_EC_EFS
config BOARD_GOOGLE_DUFFY config BOARD_GOOGLE_DUFFY
bool "-> Duffy" bool "-> Duffy"
select BOARD_GOOGLE_BASEBOARD_HATCH select BOARD_GOOGLE_BASEBOARD_PUFF
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
select ROMSTAGE_SPD_SMBUS
select SPD_READ_BY_WORD
select VBOOT_EC_EFS select VBOOT_EC_EFS
config BOARD_GOOGLE_HATCH config BOARD_GOOGLE_HATCH
bool "-> Hatch" bool "-> Hatch"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_32768 select BOARD_ROMSIZE_KB_32768
config BOARD_GOOGLE_JINLON config BOARD_GOOGLE_JINLON
bool "-> Jinlon" bool "-> Jinlon"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
select DRIVERS_GFX_GENERIC select DRIVERS_GFX_GENERIC
config BOARD_GOOGLE_KAISA_LEGACY config BOARD_GOOGLE_KAISA_LEGACY
bool "-> Kaisa Legacy (32MB)" bool "-> Kaisa Legacy (32MB)"
select BOARD_GOOGLE_BASEBOARD_HATCH select BOARD_GOOGLE_BASEBOARD_PUFF
select BOARD_ROMSIZE_KB_32768 select BOARD_ROMSIZE_KB_32768
select ROMSTAGE_SPD_SMBUS
select SPD_READ_BY_WORD
select VBOOT_EC_EFS select VBOOT_EC_EFS
config BOARD_GOOGLE_KAISA config BOARD_GOOGLE_KAISA
bool "-> Kaisa" bool "-> Kaisa"
select BOARD_GOOGLE_BASEBOARD_HATCH select BOARD_GOOGLE_BASEBOARD_PUFF
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
select ROMSTAGE_SPD_SMBUS
select SPD_READ_BY_WORD
select VBOOT_EC_EFS select VBOOT_EC_EFS
config BOARD_GOOGLE_KOHAKU config BOARD_GOOGLE_KOHAKU
bool "-> Kohaku" bool "-> Kohaku"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_KINDRED config BOARD_GOOGLE_KINDRED
bool "-> Kindred" bool "-> Kindred"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
select SOC_INTEL_COMMON_MMC_OVERRIDE select SOC_INTEL_COMMON_MMC_OVERRIDE
config BOARD_GOOGLE_HELIOS config BOARD_GOOGLE_HELIOS
bool "-> Helios" bool "-> Helios"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
select CHROMEOS_DSM_CALIB select CHROMEOS_DSM_CALIB
select DRIVERS_I2C_RT1011 select DRIVERS_I2C_RT1011
config BOARD_GOOGLE_MUSHU config BOARD_GOOGLE_MUSHU
bool "-> Mushu" bool "-> Mushu"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_PALKIA config BOARD_GOOGLE_PALKIA
bool "-> Palkia" bool "-> Palkia"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
select CHROMEOS_DSM_CALIB select CHROMEOS_DSM_CALIB
select DRIVERS_I2C_RT1011 select DRIVERS_I2C_RT1011
config BOARD_GOOGLE_NIGHTFURY config BOARD_GOOGLE_NIGHTFURY
bool "-> Nightfury" bool "-> Nightfury"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
select CHROMEOS_DSM_CALIB select CHROMEOS_DSM_CALIB
select DRIVERS_I2C_MAX98390 select DRIVERS_I2C_MAX98390
config BOARD_GOOGLE_PUFF config BOARD_GOOGLE_PUFF
bool "-> Puff" bool "-> Puff"
select BOARD_GOOGLE_BASEBOARD_HATCH select BOARD_GOOGLE_BASEBOARD_PUFF
select BOARD_ROMSIZE_KB_32768 select BOARD_ROMSIZE_KB_32768
select ROMSTAGE_SPD_SMBUS
select SPD_READ_BY_WORD
config BOARD_GOOGLE_HELIOS_DISKSWAP config BOARD_GOOGLE_HELIOS_DISKSWAP
bool "-> Helios_Diskswap" bool "-> Helios_Diskswap"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
select CHROMEOS_DSM_CALIB select CHROMEOS_DSM_CALIB
select DRIVERS_I2C_RT1011 select DRIVERS_I2C_RT1011
config BOARD_GOOGLE_STRYKE config BOARD_GOOGLE_STRYKE
bool "-> Stryke" bool "-> Stryke"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_SUSHI config BOARD_GOOGLE_SUSHI
bool "-> Sushi" bool "-> Sushi"
select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP select BOARD_GOOGLE_BASEBOARD_HATCH
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384