coreboot/src/device
Duncan Laurie bf69622256 device: Allow virtual/generic devices under PCI in devicetree
This change allows a generic device to be described in the devicetree
under a PCI device, such as a root port.

Previously any device under a PCI device was expected to also be a PCI
device and that does not allow for a virtual/generic device to be
present, for example to provide ACPI properties for a root port.

The changes are:
- Ignore non-PCI devices found under a PCI device when scanning and do
not print an error for each devfn scanned.
- Don't treat non-PCI devices as leftover and remove them, instead
enable them as a static device.
- Don't attempt to configure a static device in the tree that is not a
PCIe device type.

With these changes it is now possible to have a generic device under a
PCI device, for example in a USB4/TBT root port (PCIe hotplug device)
this generic device will add ACPI properties for the PCIe tunnel routed
to the external port:

device pci 07.0 on
  chip soc/intel/common/block/pcie
    device generic 0 on end
  end
end

TEST=boot on volteer with the USB4 root port devices in chipset.cb and
ensure they are enabled properly and there are no errors printed in the
coreboot log, and that the device properties are created in the SSDT.

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: I56a491808067dc862a7adfd46852f0bd6b41cd95
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46542
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-21 15:35:33 +00:00
..
dram src/device: Drop unneeded empty lines 2020-09-21 15:56:17 +00:00
oprom src/device: Drop unneeded empty lines 2020-09-21 15:56:17 +00:00
azalia_device.c {sb/intel/*/azalia.c,device/azalia_device.c}: Reduce differences 2020-08-17 06:58:45 +00:00
cardbus_device.c src: Never set ISA Enable on PCI bridges 2020-07-28 10:54:02 +00:00
cpu_device.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
device.c treewide: Replace CONFIG(ARCH_xx) tests 2020-06-17 21:13:09 +00:00
device_const.c Change all assert(0) to BUG() 2020-08-03 05:15:15 +00:00
device_util.c superio/common: Fix NULL pointer dereferences 2020-09-28 09:31:28 +00:00
hypertransport.c src/device: Drop unneeded empty lines 2020-09-21 15:56:17 +00:00
i2c.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
i2c_bus.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
Kconfig lint: check for misuse of Kconfig SUBSYSTEM_*_ID 2020-09-20 17:03:32 +00:00
Makefile.inc device/xhci: Add xHCI utility to enumerate capabilities 2020-06-10 18:50:36 +00:00
mmio.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
pci_class.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
pci_device.c device: Allow virtual/generic devices under PCI in devicetree 2020-10-21 15:35:33 +00:00
pci_early.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
pci_ops.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
pci_rom.c device/pci_rom.c: Treat BASE_DISPLAY class as GPU 2020-08-15 05:59:49 +00:00
pciexp_device.c device: Allow virtual/generic devices under PCI in devicetree 2020-10-21 15:35:33 +00:00
pcix_device.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
pnp_device.c src: Remove redundant <device/pnp_def.h> 2020-09-17 13:21:48 +00:00
resource_allocator_common.c device: Move resource allocation into a separate compilation unit 2020-05-26 15:15:21 +00:00
resource_allocator_v3.c device/resource_allocator_v3: Do not set IORESOURCE_ASSIGNED for size 0 resource 2020-05-26 15:15:54 +00:00
resource_allocator_v4.c device/resource_allocator_v4: Improve the logging in resource allocator 2020-05-28 09:43:44 +00:00
root_device.c device: Export enable_static_device() function 2020-10-21 15:35:24 +00:00
smbus_ops.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
software_i2c.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
xhci.c device/xhci: Add helper method to iterate over xhci_supported_protocl 2020-07-12 17:01:24 +00:00