diff options
author | Raul E Rangel <rrangel@chromium.org> | 2020-05-04 16:41:22 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-05-12 20:07:25 +0000 |
commit | 5cb34e2ea0034f3d3781006234a0c8b66f4efcfe (patch) | |
tree | 6a06c0cef8e1d2a4367eec3bcf6451f8e10609db /src/soc | |
parent | 194695fd953a2a8bd10eedc9aa7811c338988d3d (diff) | |
download | coreboot-5cb34e2ea0034f3d3781006234a0c8b66f4efcfe.tar.xz |
device/pci_device: Extract pci_domain_set_resources from SOC
pci_domain_set_resources is duplicated in all the SOCs. This change
promotes the duplicated function.
Picasso was adding it again in the northbridge patch. I decided to
promote the function instead of duplicating it.
BUG=b:147042464
TEST=Build and boot trembyle.
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Iba9661ac2c3a1803783d5aa32404143c9144aea5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41041
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/picasso/chip.c | 2 | ||||
-rw-r--r-- | src/soc/intel/apollolake/chip.c | 5 | ||||
-rw-r--r-- | src/soc/intel/baytrail/chip.c | 5 | ||||
-rw-r--r-- | src/soc/intel/braswell/chip.c | 6 | ||||
-rw-r--r-- | src/soc/intel/broadwell/chip.c | 5 | ||||
-rw-r--r-- | src/soc/intel/cannonlake/chip.c | 5 | ||||
-rw-r--r-- | src/soc/intel/denverton_ns/chip.c | 5 | ||||
-rw-r--r-- | src/soc/intel/icelake/chip.c | 5 | ||||
-rw-r--r-- | src/soc/intel/jasperlake/chip.c | 5 | ||||
-rw-r--r-- | src/soc/intel/quark/chip.c | 5 | ||||
-rw-r--r-- | src/soc/intel/skylake/chip.c | 5 | ||||
-rw-r--r-- | src/soc/intel/tigerlake/chip.c | 5 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/cpx/chip.c | 5 |
13 files changed, 1 insertions, 62 deletions
diff --git a/src/soc/amd/picasso/chip.c b/src/soc/amd/picasso/chip.c index 2e0ba7eaf3..05106f569b 100644 --- a/src/soc/amd/picasso/chip.c +++ b/src/soc/amd/picasso/chip.c @@ -78,7 +78,7 @@ const char *soc_acpi_name(const struct device *dev) struct device_operations pci_domain_ops = { .read_resources = pci_domain_read_resources, - .set_resources = domain_set_resources, + .set_resources = pci_domain_set_resources, .scan_bus = pci_domain_scan_bus, .acpi_name = soc_acpi_name, }; diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index 778132e7ad..058222ce39 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -197,11 +197,6 @@ const char *soc_acpi_name(const struct device *dev) return NULL; } -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = pci_domain_read_resources, .set_resources = pci_domain_set_resources, diff --git a/src/soc/intel/baytrail/chip.c b/src/soc/intel/baytrail/chip.c index 7bb294b935..b7e3250a84 100644 --- a/src/soc/intel/baytrail/chip.c +++ b/src/soc/intel/baytrail/chip.c @@ -8,11 +8,6 @@ #include <soc/ramstage.h> #include "chip.h" -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = pci_domain_read_resources, .set_resources = pci_domain_set_resources, diff --git a/src/soc/intel/braswell/chip.c b/src/soc/intel/braswell/chip.c index 727982677f..c81d307f52 100644 --- a/src/soc/intel/braswell/chip.c +++ b/src/soc/intel/braswell/chip.c @@ -10,12 +10,6 @@ #include "chip.h" -static void pci_domain_set_resources(struct device *dev) -{ - printk(BIOS_SPEW, "%s/%s (%s)\n", __FILE__, __func__, dev_name(dev)); - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = pci_domain_read_resources, .set_resources = pci_domain_set_resources, diff --git a/src/soc/intel/broadwell/chip.c b/src/soc/intel/broadwell/chip.c index 740e65ed20..16afcce60c 100644 --- a/src/soc/intel/broadwell/chip.c +++ b/src/soc/intel/broadwell/chip.c @@ -7,11 +7,6 @@ #include <soc/ramstage.h> #include <soc/intel/broadwell/chip.h> -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = &pci_domain_read_resources, .set_resources = &pci_domain_set_resources, diff --git a/src/soc/intel/cannonlake/chip.c b/src/soc/intel/cannonlake/chip.c index a137762ad6..51678add67 100644 --- a/src/soc/intel/cannonlake/chip.c +++ b/src/soc/intel/cannonlake/chip.c @@ -168,11 +168,6 @@ void soc_init_pre_device(void *chip_info) soc_gpio_pm_configuration(); } -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = &pci_domain_read_resources, .set_resources = &pci_domain_set_resources, diff --git a/src/soc/intel/denverton_ns/chip.c b/src/soc/intel/denverton_ns/chip.c index f24335cecf..3bade119e6 100644 --- a/src/soc/intel/denverton_ns/chip.c +++ b/src/soc/intel/denverton_ns/chip.c @@ -17,11 +17,6 @@ #include <spi-generic.h> #include <soc/hob_mem.h> -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = &pci_domain_read_resources, .set_resources = &pci_domain_set_resources, diff --git a/src/soc/intel/icelake/chip.c b/src/soc/intel/icelake/chip.c index 176a8e4ea2..a455bfce71 100644 --- a/src/soc/intel/icelake/chip.c +++ b/src/soc/intel/icelake/chip.c @@ -124,11 +124,6 @@ void soc_init_pre_device(void *chip_info) soc_fill_gpio_pm_configuration(); } -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = &pci_domain_read_resources, .set_resources = &pci_domain_set_resources, diff --git a/src/soc/intel/jasperlake/chip.c b/src/soc/intel/jasperlake/chip.c index 95585d2b9b..6f4ee005c7 100644 --- a/src/soc/intel/jasperlake/chip.c +++ b/src/soc/intel/jasperlake/chip.c @@ -133,11 +133,6 @@ void soc_init_pre_device(void *chip_info) soc_fill_gpio_pm_configuration(); } -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = &pci_domain_read_resources, .set_resources = &pci_domain_set_resources, diff --git a/src/soc/intel/quark/chip.c b/src/soc/intel/quark/chip.c index 0852a1a58e..33033a98b6 100644 --- a/src/soc/intel/quark/chip.c +++ b/src/soc/intel/quark/chip.c @@ -106,11 +106,6 @@ static void chip_init(void *chip_info) fsp_silicon_init(romstage_handoff_is_resume()); } -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = pci_domain_read_resources, .set_resources = pci_domain_set_resources, diff --git a/src/soc/intel/skylake/chip.c b/src/soc/intel/skylake/chip.c index 4f799763c1..4ad691cb2e 100644 --- a/src/soc/intel/skylake/chip.c +++ b/src/soc/intel/skylake/chip.c @@ -78,11 +78,6 @@ void soc_fsp_load(void) fsps_load(romstage_handoff_is_resume()); } -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = &pci_domain_read_resources, .set_resources = &pci_domain_set_resources, diff --git a/src/soc/intel/tigerlake/chip.c b/src/soc/intel/tigerlake/chip.c index 68b5f8996f..c1764cde93 100644 --- a/src/soc/intel/tigerlake/chip.c +++ b/src/soc/intel/tigerlake/chip.c @@ -132,11 +132,6 @@ void soc_init_pre_device(void *chip_info) soc_fill_gpio_pm_configuration(); } -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - static struct device_operations pci_domain_ops = { .read_resources = &pci_domain_read_resources, .set_resources = &pci_domain_set_resources, diff --git a/src/soc/intel/xeon_sp/cpx/chip.c b/src/soc/intel/xeon_sp/cpx/chip.c index d986471889..2125f0a891 100644 --- a/src/soc/intel/xeon_sp/cpx/chip.c +++ b/src/soc/intel/xeon_sp/cpx/chip.c @@ -14,11 +14,6 @@ /* C620 IOAPIC has 120 redirection entries */ #define C620_IOAPIC_REDIR_ENTRIES 120 -static void pci_domain_set_resources(struct device *dev) -{ - assign_resources(dev->link_list); -} - void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd) { /* not implemented yet */ |