From 03902a01da1e620378d82e228352f3280d59b7d5 Mon Sep 17 00:00:00 2001 From: Kevin Chiu Date: Sat, 26 Sep 2020 20:25:44 +0800 Subject: mb/google/zork: disable eMMC per FW_CONFIG for Morphius Morphius has SSD/eMMC SKU, we should turn off eMMC if storage is NVMe SSD. BUG=b:169211959 BRANCH=zork TEST=1. emerge-zork coreboot 2. Check eMMC is enabled or disabled based on the eMMC bit in FW_CONFIG. Change-Id: I67d5d77ce3d827ae89b82529de59925f67eaf894 Signed-off-by: Kevin Chiu Reviewed-on: https://review.coreboot.org/c/coreboot/+/45755 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Kangheui Won --- src/mainboard/google/zork/variants/morphius/Makefile.inc | 1 + src/mainboard/google/zork/variants/morphius/variant.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/mainboard/google/zork/variants/morphius/variant.c (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/zork/variants/morphius/Makefile.inc b/src/mainboard/google/zork/variants/morphius/Makefile.inc index 57e7136ddc..51d19fe9ba 100644 --- a/src/mainboard/google/zork/variants/morphius/Makefile.inc +++ b/src/mainboard/google/zork/variants/morphius/Makefile.inc @@ -3,3 +3,4 @@ subdirs-y += ./spd ramstage-y += gpio.c +ramstage-y += variant.c diff --git a/src/mainboard/google/zork/variants/morphius/variant.c b/src/mainboard/google/zork/variants/morphius/variant.c new file mode 100644 index 0000000000..092ff260b3 --- /dev/null +++ b/src/mainboard/google/zork/variants/morphius/variant.c @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include + +void variant_devtree_update(void) +{ + struct soc_amd_picasso_config *cfg; + + cfg = config_of_soc(); + + /* + * Enable eMMC if eMMC bit is set in FW_CONFIG or device is unprovisioned. + */ + if (!(variant_has_emmc() || boot_is_factory_unprovisioned())) + cfg->emmc_config.timing = SD_EMMC_DISABLE; +} -- cgit v1.2.3