diff options
author | Furquan Shaikh <furquan@google.com> | 2020-10-03 14:49:09 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2020-10-07 01:15:54 +0000 |
commit | 7cb103461ad68e2fe1b4d3b3f71e1e140f5507f8 (patch) | |
tree | ae2b68c87f60de930d364f4afbacefde3a2903e9 /src/drivers/wifi | |
parent | f52e4a03ec30a497566c7860fbe790bfd9b9a166 (diff) |
drivers/wifi/generic: Use pci_dev_* operations for device ops
WiFi devices supported by the generic WiFi driver are PCIe devices
which need to be managed using the standard pci_dev_* operations to
read, set and enable resources. This change updates the
device_operations structure `wifi_generic_ops` to use the standard
pci_dev_* operations for these devices.
BUG=b:169802515
BRANCH=zork
Change-Id: I8b306259e205ecb963c0563000bd96ec6b978b8b
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46028
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/drivers/wifi')
-rw-r--r-- | src/drivers/wifi/generic/generic.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/drivers/wifi/generic/generic.c b/src/drivers/wifi/generic/generic.c index dd53da3b66..b175f2363c 100644 --- a/src/drivers/wifi/generic/generic.c +++ b/src/drivers/wifi/generic/generic.c @@ -4,6 +4,7 @@ #include <acpi/acpigen.h> #include <console/console.h> #include <device/device.h> +#include <device/pci.h> #include <device/pci_def.h> #include <sar.h> #include <string.h> @@ -236,9 +237,11 @@ static void wifi_generic_fill_ssdt_generator(const struct device *dev) wifi_generic_fill_ssdt(dev, dev->chip_info); } -static struct device_operations wifi_generic_ops = { - .read_resources = noop_read_resources, - .set_resources = noop_set_resources, +struct device_operations wifi_generic_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 = wifi_generic_acpi_name, .acpi_fill_ssdt = wifi_generic_fill_ssdt_generator, }; |