diff --git a/src/soc/amd/common/block/hda/hda.c b/src/soc/amd/common/block/hda/hda.c index e8436ed9ce..4e1c409d48 100644 --- a/src/soc/amd/common/block/hda/hda.c +++ b/src/soc/amd/common/block/hda/hda.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include -#include #include #include #include @@ -20,23 +19,13 @@ static const char *hda_acpi_name(const struct device *dev) return "AZHD"; } -__weak void hda_soc_ssdt_quirks(const struct device *dev) -{ -} - -static void hda_fill_ssdt(const struct device *dev) -{ - acpi_device_write_pci_dev(dev); - hda_soc_ssdt_quirks(dev); -} - static struct device_operations hda_audio_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .ops_pci = &pci_dev_ops_pci, .acpi_name = hda_acpi_name, - .acpi_fill_ssdt = hda_fill_ssdt, + .acpi_fill_ssdt = acpi_device_write_pci_dev, }; static const struct pci_driver hdaaudio_driver __pci_driver = { diff --git a/src/soc/amd/common/block/include/amdblocks/hda.h b/src/soc/amd/common/block/include/amdblocks/hda.h deleted file mode 100644 index a7a0b84f04..0000000000 --- a/src/soc/amd/common/block/include/amdblocks/hda.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef AMD_BLOCK_HDA_H -#define AMD_BLOCK_HDA_H - -#include - -/* SoC callback to add any quirks to HDA device node in SSDT. */ -void hda_soc_ssdt_quirks(const struct device *dev); - -#endif /* AMD_BLOCK_HDA_H */ diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c index 081bc1f47d..1e601cf4b7 100644 --- a/src/soc/amd/stoneyridge/northbridge.c +++ b/src/soc/amd/stoneyridge/northbridge.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -408,49 +407,3 @@ void SetNbMidParams(GNB_MID_CONFIGURATION *params) params->iGpuVgaMode = 0; params->GnbIoapicAddress = IO_APIC2_ADDR; } - -void hda_soc_ssdt_quirks(const struct device *dev) -{ - const char *scope = acpi_device_path(dev); - static const struct fieldlist list[] = { - FIELDLIST_OFFSET(0x42), - FIELDLIST_NAMESTR("NSDI", 1), - FIELDLIST_NAMESTR("NSDO", 1), - FIELDLIST_NAMESTR("NSEN", 1), - }; - struct opregion opreg = OPREGION("AZPD", PCI_CONFIG, 0x0, 0x100); - - assert(scope); - - acpigen_write_scope(scope); - - /* - * OperationRegion(AZPD, PCI_Config, 0x00, 0x100) - * Field (AZPD, AnyAcc, NoLock, Preserve) { - * Offset (0x42), - * NSDI, 1, - * NSDO, 1, - * NSEN, 1, - * } - */ - acpigen_write_opregion(&opreg); - acpigen_write_field(opreg.name, list, ARRAY_SIZE(list), - FIELD_ANYACC | FIELD_NOLOCK | FIELD_PRESERVE); - - /* - * Method (_INI, 0, NotSerialized) { - * Store (Zero, NSEN) - * Store (One, NSDO) - * Store (One, NSDI) - * } - */ - acpigen_write_method("_INI", 0); - - acpigen_write_store_op_to_namestr(ZERO_OP, "NSEN"); - acpigen_write_store_op_to_namestr(ONE_OP, "NSDO"); - acpigen_write_store_op_to_namestr(ONE_OP, "NSDI"); - - acpigen_pop_len(); /* Method _INI */ - - acpigen_pop_len(); /* Scope */ -}