diff options
author | Sean Rhodes <sean@starlabs.systems> | 2024-10-03 09:15:26 +0100 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2024-10-09 01:30:09 +0000 |
commit | bd299aee380c3fb54d006672672f6e8443f1bca9 (patch) | |
tree | 79bc45a5bda18adaca684a49697f851ee95250e1 /src | |
parent | 0b16bb85ebcd0b2238051daf9ab61508d722b7df (diff) |
soc/intel/{tigerlake,alderlake}: Correct FSP config rather than asserting
Meteor Lake handles a misconfigured devicetree better than Alder Lake
and Tiger Lake; it throws a warning and corrects the FSP config rather
than asserting.
Copy that behavior to Alder Lake and Tiger Lake.
Change-Id: Ifd768fc31a0a6ef2fa0ae7e890cf0b47a9968d30
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84647
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/alderlake/fsp_params.c | 14 | ||||
-rw-r--r-- | src/soc/intel/tigerlake/fsp_params.c | 14 |
2 files changed, 20 insertions, 8 deletions
diff --git a/src/soc/intel/alderlake/fsp_params.c b/src/soc/intel/alderlake/fsp_params.c index 7e6be27a60..6b89bb2819 100644 --- a/src/soc/intel/alderlake/fsp_params.c +++ b/src/soc/intel/alderlake/fsp_params.c @@ -900,10 +900,16 @@ static void fill_fsps_cnvi_params(FSP_S_CONFIG *s_cfg, s_cfg->CnviMode = is_devfn_enabled(PCH_DEVFN_CNVI_WIFI); s_cfg->CnviBtCore = config->cnvi_bt_core; s_cfg->CnviBtAudioOffload = config->cnvi_bt_audio_offload; - /* Assert if CNVi BT is enabled without CNVi being enabled. */ - assert(s_cfg->CnviMode || !s_cfg->CnviBtCore); - /* Assert if CNVi BT offload is enabled without CNVi BT being enabled. */ - assert(s_cfg->CnviBtCore || !s_cfg->CnviBtAudioOffload); + + if (!s_cfg->CnviBtCore && s_cfg->CnviBtAudioOffload) { + printk(BIOS_ERR, "BT offload is enabled without CNVi BT being enabled\n"); + s_cfg->CnviBtAudioOffload = 0; + } + if (!s_cfg->CnviMode && s_cfg->CnviBtCore) { + printk(BIOS_ERR, "CNVi BT is enabled without CNVi being enabled\n"); + s_cfg->CnviBtCore = 0; + s_cfg->CnviBtAudioOffload = 0; + } } static void fill_fsps_vmd_params(FSP_S_CONFIG *s_cfg, diff --git a/src/soc/intel/tigerlake/fsp_params.c b/src/soc/intel/tigerlake/fsp_params.c index d5472dd91b..fa5a549e7e 100644 --- a/src/soc/intel/tigerlake/fsp_params.c +++ b/src/soc/intel/tigerlake/fsp_params.c @@ -496,10 +496,16 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd) params->CnviMode = is_devfn_enabled(PCH_DEVFN_CNVI_WIFI); params->CnviBtCore = config->CnviBtCore; params->CnviBtAudioOffload = config->CnviBtAudioOffload; - /* Assert if CNVi BT is enabled without CNVi being enabled. */ - assert(params->CnviMode || !params->CnviBtCore); - /* Assert if CNVi BT offload is enabled without CNVi BT being enabled. */ - assert(params->CnviBtCore || !params->CnviBtAudioOffload); + + if (!params->CnviBtCore && params->CnviBtAudioOffload) { + printk(BIOS_ERR, "BT offload is enabled without CNVi BT being enabled\n"); + params->CnviBtAudioOffload = 0; + } + if (!params->CnviMode && params->CnviBtCore) { + printk(BIOS_ERR, "CNVi BT is enabled without CNVi being enabled\n"); + params->CnviBtCore = 0; + params->CnviBtAudioOffload = 0; + } /* VMD */ params->VmdEnable = is_devfn_enabled(SA_DEVFN_VMD); |