Reka Norman | 1411ecf | 2022-07-15 13:34:35 +1000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
| 3 | #include <baseboard/variants.h> |
| 4 | #include <console/console.h> |
Mark Hsieh | 28735a1 | 2023-06-09 17:55:27 +0800 | [diff] [blame^] | 5 | #include <device/device.h> |
Reka Norman | 1411ecf | 2022-07-15 13:34:35 +1000 | [diff] [blame] | 6 | #include <fw_config.h> |
| 7 | #include <soc/bootblock.h> |
Mark Hsieh | 7a0eff6 | 2022-08-08 17:37:35 +0800 | [diff] [blame] | 8 | #include <sar.h> |
| 9 | |
| 10 | const char *get_wifi_sar_cbfs_filename(void) |
| 11 | { |
| 12 | return "wifi_sar_0.hex"; |
| 13 | } |
Mark Hsieh | 28735a1 | 2023-06-09 17:55:27 +0800 | [diff] [blame^] | 14 | |
| 15 | void 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 | } |