drivers/wifi/generic: Use acpigen_write_ADR_pci_device

This change uses the helper function `acpigen_write_ADR_pci_device()`
to write _ADR object for the WiFi device.

Change-Id: I3ba38f3ec4d8024209840e93bebf2d39bbef7685
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46858
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
Furquan Shaikh 2020-10-08 22:37:48 -07:00 committed by Patrick Georgi
parent 89815c96a6
commit 2b5be8857b
1 changed files with 1 additions and 5 deletions

View File

@ -170,7 +170,6 @@ static void emit_sar_acpi_structures(const struct device *dev)
static void wifi_generic_fill_ssdt(const struct device *dev)
{
const char *path;
u32 address;
const struct drivers_wifi_generic_config *config = dev->chip_info;
if (!dev->enabled)
@ -189,10 +188,7 @@ static void wifi_generic_fill_ssdt(const struct device *dev)
acpigen_write_name_string("_DDN", dev->chip_ops->name);
/* Address */
address = PCI_SLOT(dev->path.pci.devfn) & 0xffff;
address <<= 16;
address |= PCI_FUNC(dev->path.pci.devfn) & 0xffff;
acpigen_write_name_dword("_ADR", address);
acpigen_write_ADR_pci_device(dev);
/* Wake capabilities */
if (config)