From edfc5a9df5444cfa6746b0aa78361e4dfa1ed15b Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Mon, 27 Apr 2020 18:04:46 -0700 Subject: [PATCH] soc/amd/hda: Add .acpi_name() callback to HDA driver This change adds .acpi_name() callback to HDA driver that returns "AZHD" as the ACPI device name for HDA controller. Since this is now done by the common HDA driver, this change also removes the HDA device name returned by stoneyridge in chip.c. BUG=b:153858769 Change-Id: I89eaa799518572f3c46c7ce9ef8dd3f85daa12bb Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/40781 Reviewed-by: Aaron Durbin Reviewed-by: Angel Pons Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/hda/hda.c | 6 ++++++ src/soc/amd/stoneyridge/chip.c | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/soc/amd/common/block/hda/hda.c b/src/soc/amd/common/block/hda/hda.c index c53291d815..ea42b84216 100644 --- a/src/soc/amd/common/block/hda/hda.c +++ b/src/soc/amd/common/block/hda/hda.c @@ -14,11 +14,17 @@ static const unsigned short pci_device_ids[] = { 0 }; +static const char *hda_acpi_name(const struct device *dev) +{ + return "AZHD"; +} + 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, }; static const struct pci_driver hdaaudio_driver __pci_driver = { diff --git a/src/soc/amd/stoneyridge/chip.c b/src/soc/amd/stoneyridge/chip.c index b063c7287f..3c32bf5183 100644 --- a/src/soc/amd/stoneyridge/chip.c +++ b/src/soc/amd/stoneyridge/chip.c @@ -81,8 +81,6 @@ const char *soc_acpi_name(const struct device *dev) return "PBR7"; case PCIE4_DEVFN: return "PBR8"; - case HDA1_DEVFN: - return "AZHD"; case EHCI1_DEVFN: return "EHC0"; case LPC_DEVFN: