soc/intel/common: Fix/clean up USB4 PCIe virtual/generic driver
commit389cb30ceddba90ce2d7dd0fa0cec1ff54ff1ae4
authorDuncan Laurie <dlaurie@google.com>
Sun, 18 Oct 2020 22:01:22 +0000 (18 15:01 -0700)
committerDuncan Laurie <dlaurie@chromium.org>
Wed, 21 Oct 2020 15:35:50 +0000 (21 15:35 +0000)
treedacb62202cee354d2bd5c8658439778546829f6b
parentfcbf18c5df6013c31e99662887be5c4e8bb2cf24
soc/intel/common: Fix/clean up USB4 PCIe virtual/generic driver

This driver is for the root port device and needs to reference the
parent device for its ACPI scope.  Similarly for the debug output it
needs to use the parent device, and fall back to the chip name if
config->desc is not provided in the devicetree.

The UID property is removed.  This value is not the same as the port
number; according to some docs it should be unique but it is not fully
clear what it should be tied to.  Regardless, it is not used by the
Thunderbolt driver in the kernel.

I also renamed some functions/structures to be clear that this is just
an ACPI driver for the PCIe root port and not a driver for the root port
itself.  As part of this I removed the PCI based resource operations and
the scan bus function since this device does not have children itself.

Finally I added a detailed comment with an example describing what the
driver is for and what properties it generates.

TEST=boot on volteer and ensure the USB4 root port device and properties
are added to the SSDT as described by the comment in chip.h.

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: Id6069a0fb7a0fc6836ddff1dbeca5915e444ee18
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46544
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
src/soc/intel/common/block/usb4/chip.h
src/soc/intel/common/block/usb4/pcie.c