diff options
Diffstat (limited to 'src/mainboard/google/brya/variants/joxer/variant.c')
-rw-r--r-- | src/mainboard/google/brya/variants/joxer/variant.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/joxer/variant.c b/src/mainboard/google/brya/variants/joxer/variant.c index 3a0522078d..7db0617d8a 100644 --- a/src/mainboard/google/brya/variants/joxer/variant.c +++ b/src/mainboard/google/brya/variants/joxer/variant.c @@ -2,6 +2,7 @@ #include <baseboard/variants.h> #include <console/console.h> +#include <device/device.h> #include <fw_config.h> #include <soc/bootblock.h> #include <sar.h> @@ -10,3 +11,26 @@ const char *get_wifi_sar_cbfs_filename(void) { return "wifi_sar_0.hex"; } + +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; + } +} |