sb/intel/common/pciehp: Replace HP dummy device with common code
Use the common PCIEXP_HOTPLUG code to generate a dummy device for PCIe
ports supporting hotplug. This allows to have control over how much
resources are allocated to hotplug ports.
Tested on thinkpad X220: now hotplugging a dGPU via the expresscard
slot sometimes works.
Change-Id: I3eec5214c9d200ef97d1ccfdc00e8ea0ee7cfbc6
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51068
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Patrick Rudolph
diff --git a/src/southbridge/intel/i82801ix/Kconfig b/src/southbridge/intel/i82801ix/Kconfig
index 3ee2943..992562f 100644
--- a/src/southbridge/intel/i82801ix/Kconfig
+++ b/src/southbridge/intel/i82801ix/Kconfig
@@ -38,4 +38,7 @@
bool
default n
+config PCIEXP_HOTPLUG
+ default y
+
endif
diff --git a/src/southbridge/intel/i82801ix/pcie.c b/src/southbridge/intel/i82801ix/pcie.c
index 3900e92..a20e7d6 100644
--- a/src/southbridge/intel/i82801ix/pcie.c
+++ b/src/southbridge/intel/i82801ix/pcie.c
@@ -63,11 +63,11 @@
{
struct southbridge_intel_i82801ix_config *config = dev->chip_info;
- /* Normal PCIe Scan */
- pciexp_scan_bridge(dev);
-
- if (config->pcie_hotplug_map[PCI_FUNC(dev->path.pci.devfn)]) {
- intel_acpi_pcie_hotplug_scan_slot(dev->link_list);
+ if (CONFIG(PCIEXP_HOTPLUG) && config->pcie_hotplug_map[PCI_FUNC(dev->path.pci.devfn)]) {
+ pciexp_hotplug_scan_bridge(dev);
+ } else {
+ /* Normal PCIe Scan */
+ pciexp_scan_bridge(dev);
}
}