soc/amd/cezanne/fsp_m_params: set HD Audio enable UPD from devicetree
Pass the info if the non-graphics HD audio controller device is enabled or disabled in the board's devicetree via a UPD to the FSP so that it knows if it should enable or disable the corresponding device. TEST=When adding "device ref hda on end" to the devicetree of amd/majolica the non-graphics HD Audio controller shows up in lspci and when that line isn't added the PCIe device doesn't show up. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I9f5e164d308906bfc788e5c2674c13c7b2ebf471 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55680 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
parent
95d4ee8168
commit
42583de6b8
|
@ -36,6 +36,29 @@ static bool devtree_gfx_hda_dev_enabled(void)
|
|||
return gfx_hda_dev->enabled;
|
||||
}
|
||||
|
||||
static const struct device_path hda_path[] = {
|
||||
{
|
||||
.type = DEVICE_PATH_PCI,
|
||||
.pci.devfn = PCIE_ABC_A_DEVFN
|
||||
},
|
||||
{
|
||||
.type = DEVICE_PATH_PCI,
|
||||
.pci.devfn = HD_AUDIO_DEVFN
|
||||
},
|
||||
};
|
||||
|
||||
static bool devtree_hda_dev_enabled(void)
|
||||
{
|
||||
const struct device *hda_dev;
|
||||
|
||||
hda_dev = find_dev_nested_path(pci_root_bus(), hda_path, ARRAY_SIZE(hda_path));
|
||||
|
||||
if (!hda_dev)
|
||||
return false;
|
||||
|
||||
return hda_dev->enabled;
|
||||
}
|
||||
|
||||
static const struct device_path sata0_path[] = {
|
||||
{
|
||||
.type = DEVICE_PATH_PCI,
|
||||
|
@ -202,6 +225,7 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
|
|||
mcfg->pspp_policy = config->pspp_policy;
|
||||
|
||||
mcfg->enable_nb_azalia = devtree_gfx_hda_dev_enabled();
|
||||
mcfg->hda_enable = devtree_hda_dev_enabled();
|
||||
mcfg->sata_enable = devtree_sata_dev_enabled();
|
||||
|
||||
if (config->usb_phy_custom)
|
||||
|
|
Loading…
Reference in New Issue