summaryrefslogtreecommitdiff
path: root/src/mainboard/google/hatch/variants
diff options
context:
space:
mode:
authorDavid Wu <david_wu@quanta.corp-partner.google.com>2019-07-18 17:25:43 +0800
committerMartin Roth <martinroth@google.com>2019-07-21 18:50:00 +0000
commit6f76d0b12fcc04a118cb8827b58f56f395435fbb (patch)
tree29378a4ab2ceee57c32a37b0b7751825b2ed516e /src/mainboard/google/hatch/variants
parent7f383c0b4122193a5cd1efaa2aad214ed9f01896 (diff)
mb/google/hatch/var/kindred: Implement variant_devtree_update()
This change provides an implementation of variant_devtree_update() for kindred that disable eMMC controller when SKU ID = 1 or 3 BUG=b:132918661 TEST=Verify eMMC is disabled when SKU ID = 1 or 3 Change-Id: I8ccb4dae54f223881e0ced9e034bf45b994cc6f2 Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34400 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/mainboard/google/hatch/variants')
-rw-r--r--src/mainboard/google/hatch/variants/kindred/Makefile.inc1
-rw-r--r--src/mainboard/google/hatch/variants/kindred/variant.c34
2 files changed, 35 insertions, 0 deletions
diff --git a/src/mainboard/google/hatch/variants/kindred/Makefile.inc b/src/mainboard/google/hatch/variants/kindred/Makefile.inc
index 563275dd19..78f3812252 100644
--- a/src/mainboard/google/hatch/variants/kindred/Makefile.inc
+++ b/src/mainboard/google/hatch/variants/kindred/Makefile.inc
@@ -21,3 +21,4 @@ SPD_SOURCES += 16G_2666 # 0b101
bootblock-y += gpio.c
ramstage-y += gpio.c
+ramstage-y += variant.c
diff --git a/src/mainboard/google/hatch/variants/kindred/variant.c b/src/mainboard/google/hatch/variants/kindred/variant.c
new file mode 100644
index 0000000000..14b26ed10c
--- /dev/null
+++ b/src/mainboard/google/hatch/variants/kindred/variant.c
@@ -0,0 +1,34 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <baseboard/variants.h>
+#include <soc/pci_devs.h>
+#include <ec/google/chromeec/ec.h>
+
+void variant_devtree_update(void)
+{
+ uint32_t sku_id;
+ struct device *emmc_host;
+
+ emmc_host = pcidev_path_on_root(PCH_DEVFN_EMMC);
+
+ if (emmc_host == NULL)
+ return;
+
+ /* SKU ID 1, 3 doesn't have a eMMC device, hence disable it. */
+ sku_id = get_board_sku();
+ if (sku_id == 1 || sku_id == 3)
+ emmc_host->enabled = 0;
+}