summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-07-19 12:52:40 +0200
committerAngel Pons <th3fanbus@gmail.com>2020-07-21 18:22:09 +0000
commit492d801aabeecf2dbf0787784bbb97ab2a901dcc (patch)
tree3f6ca5955ccbf604556582514805dbcb9ae46a36 /src/device
parent1eb095402e9d1f3d0133be00d5534aab6ac03476 (diff)
downloadcoreboot-492d801aabeecf2dbf0787784bbb97ab2a901dcc.tar.xz
device/cardbus_device.c: Drop `cardbus_size_bridge_resource`
It does nothing useful anymore. Drop it before it grows moss. Change-Id: I5f95376fe2a38eda5d819c53edb85ef11ab7a0f1 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43591 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/device')
-rw-r--r--src/device/cardbus_device.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/device/cardbus_device.c b/src/device/cardbus_device.c
index cbe0c724fb..266e194f9b 100644
--- a/src/device/cardbus_device.c
+++ b/src/device/cardbus_device.c
@@ -51,23 +51,6 @@ static void cardbus_record_bridge_resource(struct device *dev, resource_t moving
resource->size = min_size;
}
-static void cardbus_size_bridge_resource(struct device *dev, unsigned int index)
-{
- struct resource *resource;
- resource_t min_size;
-
- resource = find_resource(dev, index);
- if (resource) {
- min_size = resource->size;
- /*
- * Always allocate at least the minimum size to a
- * cardbus bridge in case a new card is plugged in.
- */
- if (resource->size < min_size)
- resource->size = min_size;
- }
-}
-
void cardbus_read_resources(struct device *dev)
{
resource_t moving_base, moving_limit, moving;
@@ -88,7 +71,6 @@ void cardbus_read_resources(struct device *dev)
/* Initialize the I/O space constraints on the current bus. */
cardbus_record_bridge_resource(dev, moving, CARDBUS_IO_SIZE,
PCI_CB_IO_BASE_0, IORESOURCE_IO);
- cardbus_size_bridge_resource(dev, PCI_CB_IO_BASE_0);
/* See which bridge I/O resources are implemented. */
moving_base = pci_moving_config32(dev, PCI_CB_IO_BASE_1);
@@ -118,8 +100,6 @@ void cardbus_read_resources(struct device *dev)
type |= IORESOURCE_PREFETCH;
cardbus_record_bridge_resource(dev, moving, CARDBUS_MEM_SIZE,
PCI_CB_MEMORY_BASE_0, type);
- if (type & IORESOURCE_PREFETCH)
- cardbus_size_bridge_resource(dev, PCI_CB_MEMORY_BASE_0);
/* See which bridge memory resources are implemented. */
moving_base = pci_moving_config32(dev, PCI_CB_MEMORY_BASE_1);
@@ -129,7 +109,6 @@ void cardbus_read_resources(struct device *dev)
/* Initialize the memory space constraints on the current bus. */
cardbus_record_bridge_resource(dev, moving, CARDBUS_MEM_SIZE,
PCI_CB_MEMORY_BASE_1, IORESOURCE_MEM);
- cardbus_size_bridge_resource(dev, PCI_CB_MEMORY_BASE_1);
compact_resources(dev);
}