summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Held <felix.held@amd.corp-partner.google.com>2020-06-24 20:43:22 +0200
committerFelix Held <felix-coreboot@felixheld.de>2020-06-29 16:03:40 +0000
commitc077f4a84cac69d2bf6ff71d7a4065bfff614a69 (patch)
treed587e91f0d69e6c8c62052a4d8d338d6db4f6ca0 /src
parentaf05c86dcb2db29584ab68e77aeecc4906f034b7 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/amd/mandolin/Kconfig22
-rw-r--r--src/mainboard/amd/mandolin/Makefile.inc6
-rw-r--r--src/mainboard/amd/mandolin/variants/mandolin/board.fmd (renamed from src/mainboard/amd/mandolin/mandolin.fmd)0
-rw-r--r--src/mainboard/amd/mandolin/variants/mandolin/devicetree.cb (renamed from src/mainboard/amd/mandolin/devicetree.cb)0
-rw-r--r--src/mainboard/amd/mandolin/variants/mandolin/early_gpio.c (renamed from src/mainboard/amd/mandolin/early_gpio.c)2
-rw-r--r--src/mainboard/amd/mandolin/variants/mandolin/gpio.c (renamed from src/mainboard/amd/mandolin/gpio.c)2
-rw-r--r--src/mainboard/amd/mandolin/variants/mandolin/port_descriptors.c (renamed from src/mainboard/amd/mandolin/port_descriptors.c)0
7 files changed, 20 insertions, 12 deletions
diff --git a/src/mainboard/amd/mandolin/Kconfig b/src/mainboard/amd/mandolin/Kconfig
index 42ac9e5c6c..599e64ab83 100644
--- a/src/mainboard/amd/mandolin/Kconfig
+++ b/src/mainboard/amd/mandolin/Kconfig
@@ -7,13 +7,13 @@ config BOARD_SPECIFIC_OPTIONS
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 AMD_LPC_DEBUG_CARD
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 ONBOARD_VGA_IS_PRIMARY
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_HAVE_MCHP_FW
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_ID
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 de850b2c0a..1865e74dd9 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
index 382c03066d..382c03066d 100644
--- a/src/mainboard/amd/mandolin/mandolin.fmd
+++ b/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
index 495961feee..495961feee 100644
--- a/src/mainboard/amd/mandolin/devicetree.cb
+++ b/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
index b6dd0d6990..678de59b2c 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
index 0d2e2faa47..5270fd9610 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
index d8969b2a66..d8969b2a66 100644
--- a/src/mainboard/amd/mandolin/port_descriptors.c
+++ b/src/mainboard/amd/mandolin/variants/mandolin/port_descriptors.c