summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2024-09-30 11:10:00 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-10-01 16:36:41 +0000
commitf0e1b8b149332cefc429369da181a26069cc6bbb (patch)
treeb0204922b240e58bd2ebd357ecf7007e409937d2 /src/soc
parent6b2d756be2375ee4e7b90878ce926ead9cdece17 (diff)
soc/intel/common/cnvi: Add CNMT Mutex
Add "CNMT" Mutex, that will be used by the Bluetooth and CNVi driver. Change-Id: I607865458f925d6f4aa713e07cfa34e83b2e5c8f Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84598 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/common/block/cnvi/cnvi.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/cnvi/cnvi.c b/src/soc/intel/common/block/cnvi/cnvi.c
index 08a6d683c5..e8613101ef 100644
--- a/src/soc/intel/common/block/cnvi/cnvi.c
+++ b/src/soc/intel/common/block/cnvi/cnvi.c
@@ -1,6 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#include <acpi/acpi.h>
#include <acpi/acpi_device.h>
+#include <acpi/acpigen.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
@@ -10,6 +12,21 @@ static const char *cnvi_wifi_acpi_name(const struct device *dev)
return "CNVW";
}
+static void cnvw_fill_ssdt(const struct device *dev)
+{
+ const char *scope = acpi_device_path(dev);
+
+ acpi_device_write_pci_dev(dev);
+
+ acpigen_write_scope(scope);
+/*
+ * Mutex (CNMT, 0)
+ */
+ acpigen_write_mutex("CNMT", 0);
+
+ acpigen_write_scope_end();
+}
+
static struct device_operations cnvi_wifi_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
@@ -17,7 +34,7 @@ static struct device_operations cnvi_wifi_ops = {
.ops_pci = &pci_dev_ops_pci,
.scan_bus = scan_static_bus,
.acpi_name = cnvi_wifi_acpi_name,
- .acpi_fill_ssdt = acpi_device_write_pci_dev,
+ .acpi_fill_ssdt = cnvw_fill_ssdt,
};
static const unsigned short wifi_pci_device_ids[] = {