{lynxpoint/broadwell}: Set Azalia HDCFG.BCLD bit

Lock down several HD Audio registers by setting the HDCFG.BCLD bit.

Tested on Asrock B85M Pro4, the GCAP register becomes read-only.

Change-Id: Id6208289a68baaedc4aad51cc0c5355f996a1b00
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51645
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Angel Pons 2021-03-18 20:35:19 +01:00
parent 1895d1a181
commit c1301dd2d2
2 changed files with 14 additions and 0 deletions

View File

@ -129,12 +129,19 @@ static void hda_enable(struct device *dev)
} }
} }
static void hda_final(struct device *dev)
{
/* Set HDCFG.BCLD */
pci_or_config16(dev, 0x40, 1 << 1);
}
static struct device_operations hda_ops = { static struct device_operations hda_ops = {
.read_resources = &pci_dev_read_resources, .read_resources = &pci_dev_read_resources,
.set_resources = &pci_dev_set_resources, .set_resources = &pci_dev_set_resources,
.enable_resources = &pci_dev_enable_resources, .enable_resources = &pci_dev_enable_resources,
.init = &hda_init, .init = &hda_init,
.enable = &hda_enable, .enable = &hda_enable,
.final = &hda_final,
.ops_pci = &pci_dev_ops_pci, .ops_pci = &pci_dev_ops_pci,
}; };

View File

@ -121,11 +121,18 @@ static void azalia_init(struct device *dev)
} }
} }
static void azalia_final(struct device *dev)
{
/* Set HDCFG.BCLD */
pci_or_config16(dev, 0x40, 1 << 1);
}
static struct device_operations azalia_ops = { static struct device_operations azalia_ops = {
.read_resources = pci_dev_read_resources, .read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = azalia_init, .init = azalia_init,
.final = azalia_final,
.ops_pci = &pci_dev_ops_pci, .ops_pci = &pci_dev_ops_pci,
}; };