diff options
-rw-r--r-- | src/drivers/usb/acpi/chip.h | 1 | ||||
-rw-r--r-- | src/drivers/usb/acpi/intel_bluetooth.c | 22 | ||||
-rw-r--r-- | src/drivers/usb/acpi/usb_acpi.c | 7 | ||||
-rw-r--r-- | src/soc/intel/common/block/cnvi/cnvi.c | 17 |
4 files changed, 26 insertions, 21 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)); } diff --git a/src/soc/intel/common/block/cnvi/cnvi.c b/src/soc/intel/common/block/cnvi/cnvi.c index e8613101ef..cf46fdb206 100644 --- a/src/soc/intel/common/block/cnvi/cnvi.c +++ b/src/soc/intel/common/block/cnvi/cnvi.c @@ -12,21 +12,6 @@ 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, @@ -34,7 +19,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 = cnvw_fill_ssdt, + .acpi_fill_ssdt = acpi_device_write_pci_dev, }; static const unsigned short wifi_pci_device_ids[] = { |