mb/starlabs/starbook/adl: Fix the disable wireless CMOS option

The current CMOS option causes Linux to not boot, as the GRUB EFI
loader will report an incorrect parameter.

Update the CMOS option so that the corresponding UPD is changed when
the wireless is set to disable, so that the root port for the wireless
is also disabled.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I607d700319d6a58618ec95b3440e695c82dff196
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71896
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Sean Rhodes 2023-01-14 21:09:46 +00:00 committed by Felix Held
parent b45502cd64
commit 6e8c509d7d
2 changed files with 6 additions and 4 deletions

View File

@ -21,8 +21,6 @@ void devtree_update(void)
struct soc_power_limits_config *soc_conf_12core =
&cfg->power_limits_config[ADL_P_682_28W_CORE];
struct device *nic_dev = pcidev_on_root(0x1c, 4);
/* Update PL1 & PL2 based on CMOS settings */
switch (get_power_profile(PP_POWER_SAVER)) {
case PP_POWER_SAVER:
@ -49,9 +47,9 @@ void devtree_update(void)
break;
}
/* Enable/Disable Wireless based on CMOS settings */
/* Enable/Disable Bluetooth based on CMOS settings */
if (get_uint_option("wireless", 1) == 0)
nic_dev->enabled = 0;
cfg->usb2_ports[9].enable = 0;
/* Enable/Disable Webcam based on CMOS settings */
if (get_uint_option("webcam", 1) == 0)

View File

@ -29,4 +29,8 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
const uint8_t vtd = get_uint_option("vtd", 1);
mupd->FspmConfig.VtdDisable = !vtd;
/* Enable/Disable Wireless (RP05) based on CMOS settings */
if (get_uint_option("wireless", 1) == 0)
mupd->FspmConfig.PcieRpEnableMask &= ~(1 << 4);
};