Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/62746 )
Change subject: drivers/wifi/generic: Add ops to generic cnvi device ......................................................................
drivers/wifi/generic: Add ops to generic cnvi device
When adding properties to the Intel CNVi devices, a chip driver and a generic device are added underneath to contain the chip config properties. Currently there are no ops for this, and so a BIOS_ERR is printed that there is a device with no `read_resources` callback, which is true. Therefore, this patch adds a noop ops to this generic device.
BUG=b:220639445 TEST=error message about a GENERIC 0.0 device missing read_resources is gone.
Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org Change-Id: Iafd86458d2f65ccb7e74d1308d37fd3ebbf7f520 --- M src/drivers/wifi/generic/generic.c 1 file changed, 10 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/62746/1
diff --git a/src/drivers/wifi/generic/generic.c b/src/drivers/wifi/generic/generic.c index a6936f1..bfc161c 100644 --- a/src/drivers/wifi/generic/generic.c +++ b/src/drivers/wifi/generic/generic.c @@ -21,6 +21,7 @@ .enable_resources = pci_dev_enable_resources, .init = wifi_pci_dev_init, .ops_pci = &pci_dev_ops_pci, + .scan_bus = scan_static_bus, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = wifi_pcie_acpi_name, .acpi_fill_ssdt = wifi_pcie_fill_ssdt, @@ -61,17 +62,19 @@ return config->enable_cnvi_ddr_rfim; }
+struct device_operations wifi_generic_ops = { + .read_resources = noop_read_resources, + .set_resources = noop_set_resources, +}; + static void wifi_generic_enable(struct device *dev) { - DEVTREE_CONST struct drivers_wifi_generic_config *config = dev ? dev->chip_info : NULL; - - if (!config) - return; - #if !DEVTREE_EARLY - if (is_cnvi(dev)) + if (dev->path.type == DEVICE_PATH_GENERIC) + dev->ops = &wifi_generic_ops; + else if (is_cnvi(dev)) dev->ops = &wifi_cnvi_ops; - else + else if (dev->path.type == DEVICE_PATH_PCI) dev->ops = &wifi_pcie_ops; #endif }