diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-01-20 13:03:58 +0100 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2021-01-30 23:13:22 +0000 |
commit | 90be7544e4089e3f140298620e23926a8c791760 (patch) | |
tree | 8254a82265277639f1d275813bfb99a59703f08d | |
parent | a6b0922aa1c4f685056d3dab75a3b330b91b36bd (diff) |
device: Drop `mmconf_resource_init` function
All uses of `mmconf_resource_init` have been replaced in previous
patches with `mmconf_resource`, which uses Kconfig symbol values.
Change-Id: I4473268016ed511aa5c4930a71977e722e34162a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50112
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
-rw-r--r-- | src/device/device_util.c | 15 | ||||
-rw-r--r-- | src/include/device/device.h | 1 |
2 files changed, 4 insertions, 12 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c index 0bce26a99e..0337fb2fb2 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -862,11 +862,11 @@ void fixed_io_resource(struct device *dev, unsigned long index, IORESOURCE_RESERVE; } -void mmconf_resource_init(struct resource *resource, resource_t base, - int buses) +void mmconf_resource(struct device *dev, unsigned long index) { - resource->base = base; - resource->size = buses * MiB; + struct resource *resource = new_resource(dev, index); + resource->base = CONFIG_MMCONF_BASE_ADDRESS; + resource->size = CONFIG_MMCONF_LENGTH; resource->flags = IORESOURCE_MEM | IORESOURCE_RESERVE | IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED; @@ -875,13 +875,6 @@ void mmconf_resource_init(struct resource *resource, resource_t base, (unsigned long)(resource->base + resource->size)); } -void mmconf_resource(struct device *dev, unsigned long index) -{ - struct resource *resource = new_resource(dev, index); - mmconf_resource_init(resource, CONFIG_MMCONF_BASE_ADDRESS, - CONFIG_MMCONF_BUS_NUMBER); -} - void tolm_test(void *gp, struct device *dev, struct resource *new) { struct resource **best_p = gp; diff --git a/src/include/device/device.h b/src/include/device/device.h index 1fc5e62bdc..0e1ca12613 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -313,7 +313,6 @@ void fixed_io_resource(struct device *dev, unsigned long index, void fixed_mem_resource(struct device *dev, unsigned long index, unsigned long basek, unsigned long sizek, unsigned long type); -void mmconf_resource_init(struct resource *res, resource_t base, int buses); void mmconf_resource(struct device *dev, unsigned long index); /* It is the caller's responsibility to adjust regions such that ram_resource() |