summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/brya/variants/orisa/Makefile.mk1
-rw-r--r--src/mainboard/google/brya/variants/orisa/fw_config.c15
-rw-r--r--src/mainboard/google/brya/variants/orisa/overridetree.cb19
-rw-r--r--src/mainboard/google/brya/variants/orisa/variant.c28
4 files changed, 25 insertions, 38 deletions
diff --git a/src/mainboard/google/brya/variants/orisa/Makefile.mk b/src/mainboard/google/brya/variants/orisa/Makefile.mk
index c0c42324f8..ea9cec1404 100644
--- a/src/mainboard/google/brya/variants/orisa/Makefile.mk
+++ b/src/mainboard/google/brya/variants/orisa/Makefile.mk
@@ -8,4 +8,3 @@ romstage-y += memory.c
ramstage-$(CONFIG_FW_CONFIG) += fw_config.c
ramstage-y += gpio.c
ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_HDA_VERB) += hda_verb.c
-ramstage-y += variant.c
diff --git a/src/mainboard/google/brya/variants/orisa/fw_config.c b/src/mainboard/google/brya/variants/orisa/fw_config.c
index 800fc1f205..2977cb6c90 100644
--- a/src/mainboard/google/brya/variants/orisa/fw_config.c
+++ b/src/mainboard/google/brya/variants/orisa/fw_config.c
@@ -34,9 +34,16 @@ static const struct pad_config emmc_disable_pads[] = {
void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
{
- if (fw_config_is_provisioned() && !fw_config_probe(FW_CONFIG(STORAGE, STORAGE_EMMC))) {
- printk(BIOS_INFO, "Disable eMMC GPIO pins.\n");
- gpio_padbased_override(padbased_table, emmc_disable_pads,
- ARRAY_SIZE(emmc_disable_pads));
+ if (!fw_config_is_provisioned()) {
+ printk(BIOS_WARNING, "FW_CONFIG is not provisioned. Exiting...\n");
+ return;
+ }
+
+ if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_UNKNOWN))) {
+ if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_EMMC))) {
+ printk(BIOS_INFO, "Disable eMMC GPIO pins.\n");
+ gpio_padbased_override(padbased_table, emmc_disable_pads,
+ ARRAY_SIZE(emmc_disable_pads));
+ }
}
}
diff --git a/src/mainboard/google/brya/variants/orisa/overridetree.cb b/src/mainboard/google/brya/variants/orisa/overridetree.cb
index f04eee2c35..14324d313d 100644
--- a/src/mainboard/google/brya/variants/orisa/overridetree.cb
+++ b/src/mainboard/google/brya/variants/orisa/overridetree.cb
@@ -9,9 +9,10 @@ fw_config
option PDC_TI_BYPASS 2
end
field STORAGE 30 31
- option STORAGE_EMMC 0
- option STORAGE_NVME 1
- option STORAGE_UFS 2
+ option STORAGE_EMMC 0
+ option STORAGE_NVME 1
+ option STORAGE_UFS 2
+ option STORAGE_UNKNOWN 3
end
end
@@ -521,14 +522,22 @@ chip soc/intel/alderlake
end #I2C5
device ref heci1 on end
device ref pcie_rp7 off end
- device ref emmc on end
+ device ref emmc on
+ probe STORAGE STORAGE_UNKNOWN
+ probe STORAGE STORAGE_EMMC
+ end
device ref ish on
chip drivers/intel/ish
register "add_acpi_dma_property" = "true"
device generic 0 on end
end
+ probe STORAGE STORAGE_UNKNOWN
+ probe STORAGE STORAGE_UFS
+ end
+ device ref ufs on
+ probe STORAGE STORAGE_UNKNOWN
+ probe STORAGE STORAGE_UFS
end
- device ref ufs on end
device ref uart0 on end
device ref pch_espi on
chip ec/google/chromeec
diff --git a/src/mainboard/google/brya/variants/orisa/variant.c b/src/mainboard/google/brya/variants/orisa/variant.c
deleted file mode 100644
index f34fb2698b..0000000000
--- a/src/mainboard/google/brya/variants/orisa/variant.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <baseboard/variants.h>
-#include <device/device.h>
-#include <fw_config.h>
-
-void variant_devtree_update(void)
-{
- struct device *emmc = DEV_PTR(emmc);
- struct device *ufs = DEV_PTR(ufs);
- struct device *ish = DEV_PTR(ish);
-
- if (!fw_config_is_provisioned()) {
- printk(BIOS_INFO, "fw_config unprovisioned so enable all storage devices\n");
- return;
- }
-
- if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_EMMC))) {
- printk(BIOS_INFO, "eMMC disabled by fw_config\n");
- emmc->enabled = 0;
- }
-
- if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_UFS))) {
- printk(BIOS_INFO, "UFS disabled by fw_config\n");
- ufs->enabled = 0;
- ish->enabled = 0;
- }
-}