summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/common
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-02-24 22:27:44 +0100
committerNico Huber <nico.h@gmx.de>2021-03-07 16:20:40 +0000
commita560c711093cbfc3be02018e3ef9788fead4184d (patch)
tree247db0723b3d5f81039b301451726b079cb4a74a /src/southbridge/intel/common
parentc4aa24fc1212340dcf7c6acbc18a42b5fa5d2f95 (diff)
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
Diffstat (limited to 'src/southbridge/intel/common')
-rw-r--r--src/southbridge/intel/common/pciehp.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/southbridge/intel/common/pciehp.c b/src/southbridge/intel/common/pciehp.c
index 247bf5df7f..31fbb21c63 100644
--- a/src/southbridge/intel/common/pciehp.c
+++ b/src/southbridge/intel/common/pciehp.c
@@ -117,42 +117,3 @@ void intel_acpi_pcie_hotplug_generator(u8 *hotplug_map, int port_number)
acpigen_pop_len();
}
-
-static void slot_dev_read_resources(struct device *dev)
-{
- struct resource *resource;
-
- resource = new_resource(dev, PCI_BASE_ADDRESS_0);
- resource->size = 1 << 23;
- resource->align = 22;
- resource->gran = 22;
- resource->limit = 0xffffffff;
- resource->flags |= IORESOURCE_MEM;
-
- resource = new_resource(dev, 0x14);
- resource->size = 1 << 23;
- resource->align = 22;
- resource->gran = 22;
- resource->limit = 0xffffffff;
- resource->flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH;
-
- resource = new_resource(dev, 0x18);
- resource->size = 1 << 12;
- resource->align = 12;
- resource->gran = 12;
- resource->limit = 0xffff;
- resource->flags |= IORESOURCE_IO;
-}
-
-static struct device_operations slot_dev_ops = {
- .read_resources = slot_dev_read_resources,
-};
-
-/* Add a dummy device to reserve I/O space for hotpluggable devices. */
-void intel_acpi_pcie_hotplug_scan_slot(struct bus *bus)
-{
- struct device *slot;
- struct device_path slot_path = { .type = DEVICE_PATH_NONE };
- slot = alloc_dev(bus, &slot_path);
- slot->ops = &slot_dev_ops;
-}