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>
This commit is contained in:
Raul E Rangel 2020-05-04 16:41:22 -06:00 committed by Patrick Georgi
commit 5cb34e2ea0
18 changed files with 9 additions and 74 deletions

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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 */