summaryrefslogtreecommitdiff
path: root/src/drivers/usb
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2018-12-01 17:14:35 -0800
committerDuncan Laurie <dlaurie@chromium.org>2018-12-04 22:50:15 +0000
commite1eca1d91cf05b8769e830b5ab59060a0ad5ff0c (patch)
tree6726ac337bac9263bbfb68c22f86a90f978b38f0 /src/drivers/usb
parent1e64d2386a5f281c294666cec59b45f37c40338d (diff)
downloadcoreboot-e1eca1d91cf05b8769e830b5ab59060a0ad5ff0c.tar.xz
acpi_pld: Make it easier to define the ACPI USB device groups
The Linux kernel can use the ACPI _PLD group information to determine peer ports. Currently to define the group information the devicetree must provide a complete _PLD structure. This change pulls the group information into a separate structure that can be defined in devicetree. This makes it easier to set for USB devices in devicetree that do not need a full custom PLD. This was tested on a sarien board with the USB devices defined by verifying that the USB 2/3 ports are correctly identified with their peer in sysfs. Change-Id: Ifd4cadf0f6c901eb3832ad4e1395904f99c2f5a0 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/29998 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/drivers/usb')
-rw-r--r--src/drivers/usb/acpi/chip.h8
-rw-r--r--src/drivers/usb/acpi/usb_acpi.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/drivers/usb/acpi/chip.h b/src/drivers/usb/acpi/chip.h
index 6429f13630..512893d207 100644
--- a/src/drivers/usb/acpi/chip.h
+++ b/src/drivers/usb/acpi/chip.h
@@ -46,7 +46,13 @@ struct drivers_usb_acpi_config {
*/
enum acpi_upc_type type;
- /* Define a custom physical location for the port */
+ /* Group peer ports */
+ struct acpi_pld_group group;
+
+ /*
+ * Define a custom physical location for the port.
+ * If enabled, this takes precedence over the 'group' field.
+ */
bool use_custom_pld;
struct acpi_pld custom_pld;
diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c
index f049e68c22..abc1718eb9 100644
--- a/src/drivers/usb/acpi/usb_acpi.c
+++ b/src/drivers/usb/acpi/usb_acpi.c
@@ -57,7 +57,7 @@ static void usb_acpi_fill_ssdt_generator(struct device *dev)
} else {
/* Fill PLD strucutre based on port type */
struct acpi_pld pld;
- acpi_pld_fill_usb(&pld, config->type);
+ acpi_pld_fill_usb(&pld, config->type, &config->group);
acpigen_write_pld(&pld);
}