summaryrefslogtreecommitdiff
path: root/src/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/usb')
-rw-r--r--src/drivers/usb/acpi/chip.h1
-rw-r--r--src/drivers/usb/acpi/intel_bluetooth.c22
-rw-r--r--src/drivers/usb/acpi/usb_acpi.c7
3 files changed, 25 insertions, 5 deletions
diff --git a/src/drivers/usb/acpi/chip.h b/src/drivers/usb/acpi/chip.h
index ad2e3cd485..8d2ed919fa 100644
--- a/src/drivers/usb/acpi/chip.h
+++ b/src/drivers/usb/acpi/chip.h
@@ -88,5 +88,6 @@ bool usb_acpi_get_pld(const struct device *usb_device, struct acpi_pld *pld);
/* Intel Bluetooth */
void acpi_device_intel_bt(void);
+void acpi_device_intel_bt_common(void);
#endif /* __USB_ACPI_CHIP_H__ */
diff --git a/src/drivers/usb/acpi/intel_bluetooth.c b/src/drivers/usb/acpi/intel_bluetooth.c
index 6cd27f1c81..38ef0bb390 100644
--- a/src/drivers/usb/acpi/intel_bluetooth.c
+++ b/src/drivers/usb/acpi/intel_bluetooth.c
@@ -139,15 +139,15 @@ void acpi_device_intel_bt(void)
* }
* Method (_RST, 0, NotSerialized)
* {
- * Local0 = Acquire (CNMT, 0x03E8)
+ * Local0 = Acquire (\_SB.PCI0.CNMT, 1000)
* If ((Local0 == Zero))
* {
* BTRK (Zero)
* Sleep (RDLY)
* BTRK (One)
* Sleep (RDLY)
- * }
- * Release (CNMT)
+ * Release (\_SB.PCI0.CNMT)
+ }
* }
* }
*/
@@ -168,7 +168,7 @@ void acpi_device_intel_bt(void)
acpigen_write_method("_RST", 0);
{
acpigen_write_store();
- acpigen_write_acquire("CNMT", 0x03e8);
+ acpigen_write_acquire("\\_SB.PCI0.CNMT", 1000);
acpigen_emit_byte(LOCAL0_OP);
acpigen_write_if_lequal_op_int(LOCAL0_OP, 0);
@@ -184,11 +184,23 @@ void acpi_device_intel_bt(void)
acpigen_emit_ext_op(SLEEP_OP);
acpigen_emit_namestring("RDLY");
+
+ acpigen_write_release("\\_SB.PCI0.CNMT");
}
acpigen_pop_len();
- acpigen_write_release("CNMT");
}
acpigen_pop_len();
}
acpigen_write_power_res_end();
}
+
+void acpi_device_intel_bt_common(void)
+{
+ acpigen_write_scope("\\_SB.PCI0");
+/*
+ * Mutex (CNMT, 0)
+ */
+ acpigen_write_mutex("CNMT", 0);
+
+ acpigen_pop_len();
+}
diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c
index 1fb6368852..6d72fe7e56 100644
--- a/src/drivers/usb/acpi/usb_acpi.c
+++ b/src/drivers/usb/acpi/usb_acpi.c
@@ -112,6 +112,13 @@ static void usb_acpi_fill_ssdt_generator(const struct device *dev)
acpigen_pop_len();
+ /*
+ * This is generated outside of the USB Device Scope to make it easier for
+ * other code to access it i.e. CNVi driver.
+ */
+ if (config->is_intel_bluetooth)
+ acpi_device_intel_bt_common();
+
printk(BIOS_INFO, "%s: %s at %s\n", path,
config->desc ? : dev->chip_ops->name, dev_path(dev));
}