Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/42785 )
Change subject: mb/amd/mandolin: make mandolin a variant of itself ......................................................................
mb/amd/mandolin: make mandolin a variant of itself
A follow-up patch will add Cereme which is a Mandolin variant.
Beware that the name of the EC firmware image is changed from mchp.bin to EC_mandolin.bin.
TEST=Mandolin still boots into Linux live system.
Change-Id: Ifee91306756f8a4152a6a0224e172dae7eac8f7a Signed-off-by: Felix Held felix-coreboot@felixheld.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/42785 Reviewed-by: Raul Rangel rrangel@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/amd/mandolin/Kconfig M src/mainboard/amd/mandolin/Makefile.inc R src/mainboard/amd/mandolin/variants/mandolin/board.fmd R src/mainboard/amd/mandolin/variants/mandolin/devicetree.cb R src/mainboard/amd/mandolin/variants/mandolin/early_gpio.c R src/mainboard/amd/mandolin/variants/mandolin/gpio.c R src/mainboard/amd/mandolin/variants/mandolin/port_descriptors.c 7 files changed, 20 insertions(+), 12 deletions(-)
Approvals: build bot (Jenkins): Verified Raul Rangel: Looks good to me, approved
diff --git a/src/mainboard/amd/mandolin/Kconfig b/src/mainboard/amd/mandolin/Kconfig index 42ac9e5..599e64a 100644 --- a/src/mainboard/amd/mandolin/Kconfig +++ b/src/mainboard/amd/mandolin/Kconfig @@ -7,13 +7,13 @@ select SOC_AMD_COMMON_BLOCK_USE_ESPI select SOC_AMD_PICASSO select HAVE_ACPI_TABLES - select BOARD_ROMSIZE_KB_8192 + select BOARD_ROMSIZE_KB_8192 if BOARD_AMD_MANDOLIN select AZALIA_PLUGIN_SUPPORT select HAVE_ACPI_RESUME
config FMDFILE string - default "src/mainboard/amd/mandolin/mandolin.fmd" + default "src/mainboard/amd/mandolin/variants/$(CONFIG_VARIANT_DIR)/board.fmd"
config AMD_LPC_DEBUG_CARD bool "Enable LPC-Serial debug card on the debug header" @@ -28,15 +28,23 @@
config CBFS_SIZE hex - default 0x7cf000 # Maximum size for the Mandolin FMAP + default 0x7cf000 if BOARD_AMD_MANDOLIN # Maximum size for the Mandolin FMAP
config MAINBOARD_DIR string default "amd/mandolin"
+config VARIANT_DIR + string + default "mandolin" if BOARD_AMD_MANDOLIN + config MAINBOARD_PART_NUMBER string - default "MANDOLIN" + default "MANDOLIN" if BOARD_AMD_MANDOLIN + +config DEVICETREE + string + default "variants/$(CONFIG_VARIANT_DIR)/devicetree.cb"
config MAX_CPUS int @@ -48,7 +56,7 @@
config AMD_FWM_POSITION_INDEX int - default 3 + default 3 if BOARD_AMD_MANDOLIN help TODO: might need to be adapted for better placement of files in cbfs
@@ -59,7 +67,7 @@ config MANDOLIN_MCHP_FW_FILE string depends on MANDOLIN_HAVE_MCHP_FW - default "3rdparty/blobs/mainboard/amd/mandolin/mchp.bin" + default "3rdparty/blobs/mainboard/amd/mandolin/EC_mandolin.bin" if BOARD_AMD_MANDOLIN
if !AMD_LPC_DEBUG_CARD choice MANDOLIN_LPC_IOMUX @@ -95,6 +103,6 @@
config VGA_BIOS_DGPU_FILE string - default "3rdparty/amd_blobs/picasso/PicassoGenericVbios.bin" + default "3rdparty/amd_blobs/picasso/PicassoGenericVbios.bin" if BOARD_AMD_MANDOLIN
endif # BOARD_AMD_MANDOLIN diff --git a/src/mainboard/amd/mandolin/Makefile.inc b/src/mainboard/amd/mandolin/Makefile.inc index de850b2..1865e74 100644 --- a/src/mainboard/amd/mandolin/Makefile.inc +++ b/src/mainboard/amd/mandolin/Makefile.inc @@ -1,10 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only
bootblock-y += bootblock.c -bootblock-y += early_gpio.c +bootblock-y += variants/$(VARIANT_DIR)/early_gpio.c
-ramstage-y += gpio.c -ramstage-y += port_descriptors.c +ramstage-y += variants/$(VARIANT_DIR)/gpio.c +ramstage-y += variants/$(VARIANT_DIR)/port_descriptors.c
ifneq ($(CONFIG_PICASSO_LPC_IOMUX),y) ramstage-y += emmc_gpio.c diff --git a/src/mainboard/amd/mandolin/mandolin.fmd b/src/mainboard/amd/mandolin/variants/mandolin/board.fmd similarity index 100% rename from src/mainboard/amd/mandolin/mandolin.fmd rename to src/mainboard/amd/mandolin/variants/mandolin/board.fmd diff --git a/src/mainboard/amd/mandolin/devicetree.cb b/src/mainboard/amd/mandolin/variants/mandolin/devicetree.cb similarity index 100% rename from src/mainboard/amd/mandolin/devicetree.cb rename to src/mainboard/amd/mandolin/variants/mandolin/devicetree.cb diff --git a/src/mainboard/amd/mandolin/early_gpio.c b/src/mainboard/amd/mandolin/variants/mandolin/early_gpio.c similarity index 97% rename from src/mainboard/amd/mandolin/early_gpio.c rename to src/mainboard/amd/mandolin/variants/mandolin/early_gpio.c index b6dd0d6..678de59 100644 --- a/src/mainboard/amd/mandolin/early_gpio.c +++ b/src/mainboard/amd/mandolin/variants/mandolin/early_gpio.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/gpio.h> -#include "gpio.h" +#include "../../gpio.h"
/* GPIO pins used by coreboot should be initialized in bootblock */
diff --git a/src/mainboard/amd/mandolin/gpio.c b/src/mainboard/amd/mandolin/variants/mandolin/gpio.c similarity index 97% rename from src/mainboard/amd/mandolin/gpio.c rename to src/mainboard/amd/mandolin/variants/mandolin/gpio.c index 0d2e2fa..5270fd9 100644 --- a/src/mainboard/amd/mandolin/gpio.c +++ b/src/mainboard/amd/mandolin/variants/mandolin/gpio.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/gpio.h> -#include "gpio.h" +#include "../../gpio.h"
/* * As a rule of thumb, GPIO pins used by coreboot should be initialized at diff --git a/src/mainboard/amd/mandolin/port_descriptors.c b/src/mainboard/amd/mandolin/variants/mandolin/port_descriptors.c similarity index 100% rename from src/mainboard/amd/mandolin/port_descriptors.c rename to src/mainboard/amd/mandolin/variants/mandolin/port_descriptors.c