Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/74471?usp=email )
Change subject: google/zork: Convert baseboard directory layout ......................................................................
google/zork: Convert baseboard directory layout
There are two baseboards within the set of mainboards built here, with baseboard name appended in the filenames. Take the style and variable BASEBOARD_DIR from google/brya, then move and rename the supporting files under separate directories.
Change-Id: I2046b6f82519540b8596ce925203bd60d1870c1c Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/74471 Reviewed-by: Felix Held felix-coreboot@felixheld.de Reviewed-by: Eric Lai eric_lai@quanta.corp-partner.google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/Makefile.inc M src/mainboard/google/zork/variants/baseboard/Makefile.inc A src/mainboard/google/zork/variants/baseboard/dalboz/Makefile.inc R src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb R src/mainboard/google/zork/variants/baseboard/dalboz/fsps.c R src/mainboard/google/zork/variants/baseboard/dalboz/gpio.c A src/mainboard/google/zork/variants/baseboard/trembyle/Makefile.inc R src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb R src/mainboard/google/zork/variants/baseboard/trembyle/fsps.c R src/mainboard/google/zork/variants/baseboard/trembyle/gpio.c 11 files changed, 49 insertions(+), 45 deletions(-)
Approvals: Eric Lai: Looks good to me, approved build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig index 68c5ba1..3481810 100644 --- a/src/mainboard/google/zork/Kconfig +++ b/src/mainboard/google/zork/Kconfig @@ -88,9 +88,13 @@ default "Shuboz" if BOARD_GOOGLE_SHUBOZ default "Gumboz" if BOARD_GOOGLE_GUMBOZ
+config BASEBOARD_DIR + string + default "trembyle" if BOARD_GOOGLE_BASEBOARD_TREMBYLE + default "dalboz" if BOARD_GOOGLE_BASEBOARD_DALBOZ + config DEVICETREE - default "variants/baseboard/devicetree_trembyle.cb" if BOARD_GOOGLE_BASEBOARD_TREMBYLE - default "variants/baseboard/devicetree_dalboz.cb" if BOARD_GOOGLE_BASEBOARD_DALBOZ + default "variants/baseboard/$(CONFIG_BASEBOARD_DIR)/devicetree.cb"
config OVERRIDE_DEVICETREE default "variants/$(CONFIG_VARIANT_DIR)/overridetree.cb" diff --git a/src/mainboard/google/zork/Makefile.inc b/src/mainboard/google/zork/Makefile.inc index a260b0f..df809cb 100644 --- a/src/mainboard/google/zork/Makefile.inc +++ b/src/mainboard/google/zork/Makefile.inc @@ -13,6 +13,9 @@ verstage-y += chromeos.c verstage-y += verstage.c
+BASEBOARD_DIR:=$(call strip_quotes,$(CONFIG_BASEBOARD_DIR)) + +subdirs-y += variants/baseboard/$(BASEBOARD_DIR) subdirs-y += variants/baseboard subdirs-y += variants/$(VARIANT_DIR)/spd subdirs-y += spd diff --git a/src/mainboard/google/zork/variants/baseboard/Makefile.inc b/src/mainboard/google/zork/variants/baseboard/Makefile.inc index 437ba0b..2a35748 100644 --- a/src/mainboard/google/zork/variants/baseboard/Makefile.inc +++ b/src/mainboard/google/zork/variants/baseboard/Makefile.inc @@ -1,57 +1,15 @@ # SPDX-License-Identifier: GPL-2.0-or-later
-bootblock-y += helpers.c -bootblock-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += gpio_baseboard_trembyle.c -bootblock-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += gpio_baseboard_dalboz.c +all-y += helpers.c
-verstage-y += helpers.c -verstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += gpio_baseboard_trembyle.c -verstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += gpio_baseboard_dalboz.c verstage-y += tpm_tis.c - -romstage-y += helpers.c -romstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += gpio_baseboard_trembyle.c -romstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += gpio_baseboard_dalboz.c romstage-y += tpm_tis.c - -ramstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += gpio_baseboard_trembyle.c -ramstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += fsps_baseboard_trembyle.c -ramstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += gpio_baseboard_dalboz.c -ramstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += fsps_baseboard_dalboz.c -ramstage-y += helpers.c ramstage-y += tpm_tis.c ramstage-y += ramstage_common.c
-smm-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += gpio_baseboard_trembyle.c -smm-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += gpio_baseboard_dalboz.c - # Add OEM ID table ifeq ($(CONFIG_USE_OEM_BIN),y) cbfs-files-y += oem.bin oem.bin-file := $(call strip_quotes,$(CONFIG_OEM_BIN_FILE)) oem.bin-type := raw endif #($(CONFIG_USE_OEM_BIN),y) - -# APCB Board ID GPIO configuration. -# These GPIOs determine which memory SPD will be used during boot. -# APCB_BOARD_ID_GPIO[0-3] = GPIO_NUMBER GPIO_IO_MUX GPIO_BANK_CTL -# GPIO_NUMBER: FCH GPIO number -# GPIO_IO_MUX: Value write to IOMUX to configure this GPIO -# GPIO_BANK_CTL: Value write to GPIOBankCtl[23:16] to configure this GPIO -# APCB_POPULATE_2ND_CHANNEL: Populates 2nd memory channel in APCB when true. -# Trembyle based boards select 1 or 2 channels based on AGPIO84 -# Dalboz based boards only support 1 channel -ifeq ($(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE),y) -APCB_BOARD_ID_GPIO0 = 121 1 0 -APCB_BOARD_ID_GPIO1 = 120 1 0 -APCB_BOARD_ID_GPIO2 = 131 3 0 -APCB_BOARD_ID_GPIO3 = 116 1 0 -APCB_POPULATE_2ND_CHANNEL = true -else ifeq ($(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ),y) -APCB_BOARD_ID_GPIO0 = 132 1 0 -APCB_BOARD_ID_GPIO1 = 90 1 0 -APCB_BOARD_ID_GPIO2 = 86 3 0 -APCB_BOARD_ID_GPIO3 = 69 1 0 -else -$(error Undefined APCB selection GPIOS for Zork baseboard) -endif #($(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE),y) diff --git a/src/mainboard/google/zork/variants/baseboard/dalboz/Makefile.inc b/src/mainboard/google/zork/variants/baseboard/dalboz/Makefile.inc new file mode 100644 index 0000000..66dc175 --- /dev/null +++ b/src/mainboard/google/zork/variants/baseboard/dalboz/Makefile.inc @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +all-y += gpio.c +smm-y += gpio.c +ramstage-y += fsps.c + +# APCB Board ID GPIO configuration. +# These GPIOs determine which memory SPD will be used during boot. +# APCB_BOARD_ID_GPIO[0-3] = GPIO_NUMBER GPIO_IO_MUX GPIO_BANK_CTL +# GPIO_NUMBER: FCH GPIO number +# GPIO_IO_MUX: Value write to IOMUX to configure this GPIO +# GPIO_BANK_CTL: Value write to GPIOBankCtl[23:16] to configure this GPIO +# APCB_POPULATE_2ND_CHANNEL: Populates 2nd memory channel in APCB when true. +# Trembyle based boards select 1 or 2 channels based on AGPIO84 +# Dalboz based boards only support 1 channel +APCB_BOARD_ID_GPIO0 = 132 1 0 +APCB_BOARD_ID_GPIO1 = 90 1 0 +APCB_BOARD_ID_GPIO2 = 86 3 0 +APCB_BOARD_ID_GPIO3 = 69 1 0 diff --git a/src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb b/src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb similarity index 100% rename from src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb rename to src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb diff --git a/src/mainboard/google/zork/variants/baseboard/fsps_baseboard_dalboz.c b/src/mainboard/google/zork/variants/baseboard/dalboz/fsps.c similarity index 100% rename from src/mainboard/google/zork/variants/baseboard/fsps_baseboard_dalboz.c rename to src/mainboard/google/zork/variants/baseboard/dalboz/fsps.c diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c b/src/mainboard/google/zork/variants/baseboard/dalboz/gpio.c similarity index 100% rename from src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c rename to src/mainboard/google/zork/variants/baseboard/dalboz/gpio.c diff --git a/src/mainboard/google/zork/variants/baseboard/trembyle/Makefile.inc b/src/mainboard/google/zork/variants/baseboard/trembyle/Makefile.inc new file mode 100644 index 0000000..e0c4c90 --- /dev/null +++ b/src/mainboard/google/zork/variants/baseboard/trembyle/Makefile.inc @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +all-y += gpio.c +smm-y += gpio.c +ramstage-y += fsps.c + +# APCB Board ID GPIO configuration. +# These GPIOs determine which memory SPD will be used during boot. +# APCB_BOARD_ID_GPIO[0-3] = GPIO_NUMBER GPIO_IO_MUX GPIO_BANK_CTL +# GPIO_NUMBER: FCH GPIO number +# GPIO_IO_MUX: Value write to IOMUX to configure this GPIO +# GPIO_BANK_CTL: Value write to GPIOBankCtl[23:16] to configure this GPIO +# APCB_POPULATE_2ND_CHANNEL: Populates 2nd memory channel in APCB when true. +# Trembyle based boards select 1 or 2 channels based on AGPIO84 +# Dalboz based boards only support 1 channel +APCB_BOARD_ID_GPIO0 = 121 1 0 +APCB_BOARD_ID_GPIO1 = 120 1 0 +APCB_BOARD_ID_GPIO2 = 131 3 0 +APCB_BOARD_ID_GPIO3 = 116 1 0 +APCB_POPULATE_2ND_CHANNEL = true diff --git a/src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb b/src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb similarity index 100% rename from src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb rename to src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb diff --git a/src/mainboard/google/zork/variants/baseboard/fsps_baseboard_trembyle.c b/src/mainboard/google/zork/variants/baseboard/trembyle/fsps.c similarity index 100% rename from src/mainboard/google/zork/variants/baseboard/fsps_baseboard_trembyle.c rename to src/mainboard/google/zork/variants/baseboard/trembyle/fsps.c diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c b/src/mainboard/google/zork/variants/baseboard/trembyle/gpio.c similarity index 100% rename from src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c rename to src/mainboard/google/zork/variants/baseboard/trembyle/gpio.c