summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/usb/acpi/chip.h6
-rw-r--r--src/drivers/usb/acpi/usb_acpi.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/src/drivers/usb/acpi/chip.h b/src/drivers/usb/acpi/chip.h
index 4adffcf2c0..9acd382c3d 100644
--- a/src/drivers/usb/acpi/chip.h
+++ b/src/drivers/usb/acpi/chip.h
@@ -72,6 +72,12 @@ struct drivers_usb_acpi_config {
* will always return ON.
*/
bool use_gpio_for_status;
+
+ /*
+ * Generate _DSM method Function 5 to disable USB U1/U2 transition
+ * for a port
+ */
+ bool usb_lpm_incapable;
};
/* Method to get PLD structure from USB device */
diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c
index f72129cba8..b95ebc9a60 100644
--- a/src/drivers/usb/acpi/usb_acpi.c
+++ b/src/drivers/usb/acpi/usb_acpi.c
@@ -3,6 +3,7 @@
#include <acpi/acpi_device.h>
#include <acpi/acpi_pld.h>
#include <acpi/acpigen.h>
+#include <acpi/acpigen_dsm.h>
#include <console/console.h>
#include <device/device.h>
#include <device/path.h>
@@ -38,6 +39,7 @@ static void usb_acpi_fill_ssdt_generator(const struct device *dev)
struct drivers_usb_acpi_config *config = dev->chip_info;
const char *path = acpi_device_path(dev);
struct acpi_pld pld;
+ struct dsm_usb_config usb_cfg;
if (!path || !config)
return;
@@ -56,6 +58,11 @@ static void usb_acpi_fill_ssdt_generator(const struct device *dev)
else
printk(BIOS_ERR, "Error retrieving PLD for %s\n", path);
+ if (config->usb_lpm_incapable) {
+ usb_cfg.usb_lpm_incapable = 1;
+ acpigen_write_dsm_usb(&usb_cfg);
+ }
+
/* Resources */
if (usb_acpi_add_gpios_to_crs(config) == true) {
struct acpi_dp *dsd;