From 492d801aabeecf2dbf0787784bbb97ab2a901dcc Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sun, 19 Jul 2020 12:52:40 +0200 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/43591 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/device/cardbus_device.c | 21 --------------------- 1 file changed, 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); }