diff options
author | Furquan Shaikh <furquan@google.com> | 2020-10-27 18:00:46 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-02 06:14:12 +0000 |
commit | d4367505f18755e435cb5f578f169318c11f4b35 (patch) | |
tree | 9062d8c7456dae0a20d59cfff5dd9fe973e74a09 /src/drivers/wifi/generic/acpi.c | |
parent | 6017abbc2c725aeff2b916fe2d67f868b36f6f9d (diff) | |
download | coreboot-d4367505f18755e435cb5f578f169318c11f4b35.tar.xz |
drivers/wifi/generic: Add support for CNVi dummy device ops
This change reorganizes drivers/wifi/generic to add a new
device_operations structure for dummy CNVi device. This is done to
make the organization of CNVi PCI device in devicetree consistent
with all the other internal PCI devices of the SoC i.e. without a chip
around the PCI device.
Thus, with this change, CNVi entry in devicetree can be changed from:
```
chip drivers/wifi/generic
register "wake" = "xxyyzz"
device pci xx.y on end # CNVi PCI device
end
```
to:
```
device pci xx.y on
chip drivers/wifi/generic
register "wake" = "xxyyzz"
device generic 0 on end # Dummy CNVi device
end
end # CNVi PCI device
```
The helper functions for ACPI/SMBIOS generation are also accordingly
updated to include _pcie_ and _cnvi_ in the function name.
Change-Id: Ib3cb9ed9b81ff8d6ac85a9aaf57b641caaa2f907
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46862
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/wifi/generic/acpi.c')
-rw-r--r-- | src/drivers/wifi/generic/acpi.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c index 2afd99e485..33862d9526 100644 --- a/src/drivers/wifi/generic/acpi.c +++ b/src/drivers/wifi/generic/acpi.c @@ -218,7 +218,7 @@ static void wifi_ssdt_write_properties(const struct device *dev, const char *sco dev_path(dev)); } -void wifi_generic_fill_ssdt(const struct device *dev) +void wifi_pcie_fill_ssdt(const struct device *dev) { const char *path; @@ -233,7 +233,7 @@ void wifi_generic_fill_ssdt(const struct device *dev) wifi_ssdt_write_properties(dev, path); } -const char *wifi_generic_acpi_name(const struct device *dev) +const char *wifi_pcie_acpi_name(const struct device *dev) { static char wifi_acpi_name[WIFI_ACPI_NAME_MAX_LEN]; @@ -242,3 +242,17 @@ const char *wifi_generic_acpi_name(const struct device *dev) (dev_path_encode(dev) & 0xff)); return wifi_acpi_name; } + +void wifi_cnvi_fill_ssdt(const struct device *dev) +{ + const char *path; + + if (!dev->enabled) + return; + + path = acpi_device_path(dev->bus->dev); + if (!path) + return; + + wifi_ssdt_write_properties(dev, path); +} |