blob: 3c23dd1ab67fc201db1cf95f6e3762191fc6360d [file] [log] [blame]
Reka Norman1411ecf2022-07-15 13:34:35 +10001/* SPDX-License-Identifier: GPL-2.0-or-later */
2
3#include <baseboard/variants.h>
4#include <console/console.h>
Mark Hsieh28735a12023-06-09 17:55:27 +08005#include <device/device.h>
Reka Norman1411ecf2022-07-15 13:34:35 +10006#include <fw_config.h>
7#include <soc/bootblock.h>
Mark Hsieh7a0eff62022-08-08 17:37:35 +08008#include <sar.h>
9
10const char *get_wifi_sar_cbfs_filename(void)
11{
Mark Hsieh19fc0042023-06-28 16:36:28 +080012 return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI_SAR_ID));
Mark Hsieh7a0eff62022-08-08 17:37:35 +080013}
Mark Hsieh28735a12023-06-09 17:55:27 +080014
15void variant_devtree_update(void)
16{
17 struct device *emmc = DEV_PTR(emmc);
18 struct device *ufs = DEV_PTR(ufs);
19 struct device *ish = DEV_PTR(ish);
20
21 if (!fw_config_is_provisioned()) {
22 printk(BIOS_INFO, "fw_config unprovisioned so enable all storage devices\n");
23 return;
24 }
25
26 if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_EMMC))) {
27 printk(BIOS_INFO, "eMMC disabled by fw_config\n");
28 emmc->enabled = 0;
29 }
30
31 if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_UFS))) {
32 printk(BIOS_INFO, "UFS disabled by fw_config\n");
33 ufs->enabled = 0;
34 ish->enabled = 0;
35 }
36}