aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/wifi/generic/generic.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2020-10-10 19:53:00 -0700
committerFurquan Shaikh <furquan@google.com>2020-10-13 18:44:31 +0000
commit8262a2c71872cc439ef522ce2e9252f6ec976ee3 (patch)
treed731e0612c5fdfd769697bc69864a7440e18a9ff /src/drivers/wifi/generic/generic.c
parent37509d7b0caf07fa0377db0aab6aa6d211225417 (diff)
drivers/{intel/wifi,wifi/generic}: Drop separate Intel WiFi driver
Currently, drivers/intel/wifi is a PCI driver (provides `struct pci_driver`) as well as a chip driver (provides `struct chip_operations`). However, there is no need for a separate chip driver for the WiFi device since drivers/wifi/generic already provides one. Having two separate chip drivers makes it difficult to multi-source WiFi devices and share the same firmware target without having to add a probe property for each of these devices. This is unnecessary since the WiFi driver in coreboot is primarily responsible for: 1. PCI resource allocation 2. ACPI SSDT node generation to expose wake property and SAR tables 3. SMBIOS table generation For the most part, coreboot can perform the above operations without really caring about the specifics of which WiFi device is being used by the mainboard. Thus, this change drops the driver for intel/wifi and moves the PCI driver support required for Intel WiFi chips into drivers/wifi/generic. The PCI driver is retained for backward compatibility with boards that never utilized the chip driver to support Intel WiFi device. For these devices, the PCI driver helps perform the same operations as above (except exposing the wake property) by utilizing the same `wifi_generic_ops`. This change also moves DRIVERS_INTEL_WIFI config to wifi/generic/Kconfig. BUG=b:169802515 BRANCH=zork Change-Id: I780a7d1a87f387d5e01e6b35aac7cca31a2033ac Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46036 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/wifi/generic/generic.c')
-rw-r--r--src/drivers/wifi/generic/generic.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/drivers/wifi/generic/generic.c b/src/drivers/wifi/generic/generic.c
index bb36861cba..ba061d0e8e 100644
--- a/src/drivers/wifi/generic/generic.c
+++ b/src/drivers/wifi/generic/generic.c
@@ -313,3 +313,67 @@ struct chip_operations drivers_wifi_generic_ops = {
CHIP_NAME("WIFI Device")
.enable_dev = wifi_generic_enable
};
+
+static const unsigned short intel_pci_device_ids[] = {
+ PCI_DEVICE_ID_1000_SERIES_WIFI,
+ PCI_DEVICE_ID_6005_SERIES_WIFI,
+ PCI_DEVICE_ID_6005_I_SERIES_WIFI,
+ PCI_DEVICE_ID_1030_SERIES_WIFI,
+ PCI_DEVICE_ID_6030_I_SERIES_WIFI,
+ PCI_DEVICE_ID_6030_SERIES_WIFI,
+ PCI_DEVICE_ID_6150_SERIES_WIFI,
+ PCI_DEVICE_ID_2030_SERIES_WIFI,
+ PCI_DEVICE_ID_2000_SERIES_WIFI,
+ PCI_DEVICE_ID_0135_SERIES_WIFI,
+ PCI_DEVICE_ID_0105_SERIES_WIFI,
+ PCI_DEVICE_ID_6035_SERIES_WIFI,
+ PCI_DEVICE_ID_5300_SERIES_WIFI,
+ PCI_DEVICE_ID_5100_SERIES_WIFI,
+ PCI_DEVICE_ID_6000_SERIES_WIFI,
+ PCI_DEVICE_ID_6000_I_SERIES_WIFI,
+ PCI_DEVICE_ID_5350_SERIES_WIFI,
+ PCI_DEVICE_ID_5150_SERIES_WIFI,
+ /* Wilkins Peak 2 */
+ PCI_DEVICE_ID_WP_7260_SERIES_1_WIFI,
+ PCI_DEVICE_ID_WP_7260_SERIES_2_WIFI,
+ /* Stone Peak 2 */
+ PCI_DEVICE_ID_SP_7265_SERIES_1_WIFI,
+ PCI_DEVICE_ID_SP_7265_SERIES_2_WIFI,
+ /* Stone Field Peak */
+ PCI_DEVICE_ID_SFP_8260_SERIES_1_WIFI,
+ PCI_DEVICE_ID_SFP_8260_SERIES_2_WIFI,
+ /* Windstorm Peak */
+ PCI_DEVICE_ID_WSP_8275_SERIES_1_WIFI,
+ /* Jefferson Peak */
+ PCI_DEVICE_ID_JP_9000_SERIES_1_WIFI,
+ PCI_DEVICE_ID_JP_9000_SERIES_2_WIFI,
+ PCI_DEVICE_ID_JP_9000_SERIES_3_WIFI,
+ /* Thunder Peak 2 */
+ PCI_DEVICE_ID_TP_9260_SERIES_WIFI,
+ /* Harrison Peak */
+ PCI_DEVICE_ID_HrP_9560_SERIES_1_WIFI,
+ PCI_DEVICE_ID_HrP_9560_SERIES_2_WIFI,
+ PCI_DEVICE_ID_HrP_9560_SERIES_3_WIFI,
+ PCI_DEVICE_ID_HrP_9560_SERIES_4_WIFI,
+ PCI_DEVICE_ID_HrP_6SERIES_WIFI,
+ /* Cyclone Peak */
+ PCI_DEVICE_ID_CyP_6SERIES_WIFI,
+ /* Typhoon Peak */
+ PCI_DEVICE_ID_TyP_6SERIES_WIFI,
+ /* Garfield Peak */
+ PCI_DEVICE_ID_GrP_6SERIES_1_WIFI,
+ PCI_DEVICE_ID_GrP_6SERIES_2_WIFI,
+ 0
+};
+
+/*
+ * The PCI driver is retained for backward compatibility with boards that never utilized the
+ * chip driver to support Intel WiFi device. For these devices, the PCI driver helps perform the
+ * same operations as above (except exposing the wake property) by utilizing the same
+ * `wifi_generic_ops`.
+ */
+static const struct pci_driver intel_wifi_pci_driver __pci_driver = {
+ .ops = &wifi_generic_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = intel_pci_device_ids,
+};