diff options
author | Furquan Shaikh <furquan@google.com> | 2020-10-08 22:37:48 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-02 06:12:42 +0000 |
commit | 2b5be8857bf90b8136558279f36d86371d303095 (patch) | |
tree | 8db237342a69dacadd839a3d07222e6125fe17c0 | |
parent | 89815c96a60a89104cf75230f03de16690e9276c (diff) |
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>
-rw-r--r-- | src/drivers/wifi/generic/generic.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/drivers/wifi/generic/generic.c b/src/drivers/wifi/generic/generic.c index e8184d8c13..6ffa7f1f85 100644 --- a/src/drivers/wifi/generic/generic.c +++ b/src/drivers/wifi/generic/generic.c @@ -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) |