mb/google/zork: disable eMMC per FW_CONFIG for berknip

Berknip has SSD/eMMC SKU, we should turn off eMMC if storage is NVMe SSD.

BUG=b:170592992
BRANCH=zork
TEST=1. emerge-zork coreboot
     2. Check eMMC is enabled or disabled based on the eMMC bit in
        FW_CONFIG.

Change-Id: I7aeabc98fc16bc2837c8dcdc40c3c6a80898cdc9
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46292
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Rob Barnes <robbarnes@google.com>
This commit is contained in:
Kevin Chiu 2020-10-12 15:53:56 +08:00 committed by Aaron Durbin
parent 3f561a8e08
commit efe581254e
2 changed files with 17 additions and 0 deletions

View File

@ -3,3 +3,4 @@
subdirs-y += ./spd
ramstage-y += gpio.c
ramstage-y += variant.c

View File

@ -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;
}