summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin Chiu <Kevin.Chiu@quantatw.com>2020-09-26 20:25:44 +0800
committerFurquan Shaikh <furquan@google.com>2020-09-28 06:04:59 +0000
commit03902a01da1e620378d82e228352f3280d59b7d5 (patch)
treed7652d605b14e820876927e9493b63b9fbca7138 /src
parent263e2e15ba54bdb2a697a662528ac8200bf14c66 (diff)
downloadcoreboot-03902a01da1e620378d82e228352f3280d59b7d5.tar.xz
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 <kevin.chiu@quantatw.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45755 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Kangheui Won <khwon@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/zork/variants/morphius/Makefile.inc1
-rw-r--r--src/mainboard/google/zork/variants/morphius/variant.c16
2 files changed, 17 insertions, 0 deletions
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 <baseboard/variants.h>
+
+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;
+}