summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-05-31 00:03:28 +0200
committerNico Huber <nico.h@gmx.de>2020-06-06 20:36:51 +0000
commit1fc0edd9fe6b8072a87dce769789119e81af978b (patch)
treed4e44ae76f4c7ff4acfe7e0d7909addcd8927d4d /src/northbridge
parentfa276862f2b98f480c2cd2d6948e332756a37d54 (diff)
src: Use pci_dev_ops_pci where applicable
Change-Id: Ie004a94a49fc8f53c370412bee1c3e7eacbf8beb Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41944 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/amd/agesa/family15tn/iommu.c6
-rw-r--r--src/northbridge/amd/pi/00630F01/iommu.c6
-rw-r--r--src/northbridge/amd/pi/00730F01/iommu.c6
-rw-r--r--src/northbridge/intel/e7505/northbridge.c6
-rw-r--r--src/northbridge/intel/gm45/gma.c6
-rw-r--r--src/northbridge/intel/haswell/gma.c6
-rw-r--r--src/northbridge/intel/haswell/minihd.c6
-rw-r--r--src/northbridge/intel/haswell/northbridge.c6
-rw-r--r--src/northbridge/intel/haswell/pcie.c6
-rw-r--r--src/northbridge/intel/i945/gma.c8
-rw-r--r--src/northbridge/intel/i945/northbridge.c6
-rw-r--r--src/northbridge/intel/ironlake/gma.c6
-rw-r--r--src/northbridge/intel/ironlake/northbridge.c6
-rw-r--r--src/northbridge/intel/pineview/gma.c6
-rw-r--r--src/northbridge/intel/sandybridge/gma.c6
-rw-r--r--src/northbridge/intel/sandybridge/northbridge.c6
-rw-r--r--src/northbridge/intel/sandybridge/pcie.c6
-rw-r--r--src/northbridge/intel/x4x/gma.c6
18 files changed, 19 insertions, 91 deletions
diff --git a/src/northbridge/amd/agesa/family15tn/iommu.c b/src/northbridge/amd/agesa/family15tn/iommu.c
index a7adfee02a..7af65389f3 100644
--- a/src/northbridge/amd/agesa/family15tn/iommu.c
+++ b/src/northbridge/amd/agesa/family15tn/iommu.c
@@ -36,15 +36,11 @@ static void iommu_set_resources(struct device *dev)
pci_write_config32(dev, 0x44, res->base | (1 << 0));
}
-static struct pci_operations lops_pci = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations iommu_ops = {
.read_resources = iommu_read_resources,
.set_resources = iommu_set_resources,
.enable_resources = pci_dev_enable_resources,
- .ops_pci = &lops_pci,
+ .ops_pci = &pci_dev_ops_pci,
};
static const struct pci_driver iommu_driver __pci_driver = {
diff --git a/src/northbridge/amd/pi/00630F01/iommu.c b/src/northbridge/amd/pi/00630F01/iommu.c
index 08486cc0ee..0902243ab7 100644
--- a/src/northbridge/amd/pi/00630F01/iommu.c
+++ b/src/northbridge/amd/pi/00630F01/iommu.c
@@ -36,15 +36,11 @@ static void iommu_set_resources(struct device *dev)
pci_write_config32(dev, 0x44, res->base | (1 << 0));
}
-static struct pci_operations lops_pci = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations iommu_ops = {
.read_resources = iommu_read_resources,
.set_resources = iommu_set_resources,
.enable_resources = pci_dev_enable_resources,
- .ops_pci = &lops_pci,
+ .ops_pci = &pci_dev_ops_pci,
};
static const struct pci_driver iommu_driver __pci_driver = {
diff --git a/src/northbridge/amd/pi/00730F01/iommu.c b/src/northbridge/amd/pi/00730F01/iommu.c
index fa0932a5f1..ef478dda15 100644
--- a/src/northbridge/amd/pi/00730F01/iommu.c
+++ b/src/northbridge/amd/pi/00730F01/iommu.c
@@ -26,15 +26,11 @@ static void iommu_set_resources(struct device *dev)
pci_dev_set_resources(dev);
}
-static struct pci_operations lops_pci = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations iommu_ops = {
.read_resources = iommu_read_resources,
.set_resources = iommu_set_resources,
.enable_resources = pci_dev_enable_resources,
- .ops_pci = &lops_pci,
+ .ops_pci = &pci_dev_ops_pci,
};
static const struct pci_driver iommu_driver __pci_driver = {
diff --git a/src/northbridge/intel/e7505/northbridge.c b/src/northbridge/intel/e7505/northbridge.c
index ee6ec5a0ec..fc771b3c3a 100644
--- a/src/northbridge/intel/e7505/northbridge.c
+++ b/src/northbridge/intel/e7505/northbridge.c
@@ -61,15 +61,11 @@ static void mch_domain_set_resources(struct device *dev)
assign_resources(dev->link_list);
}
-static struct pci_operations intel_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations pci_domain_ops = {
.read_resources = mch_domain_read_resources,
.set_resources = mch_domain_set_resources,
.scan_bus = pci_domain_scan_bus,
- .ops_pci = &intel_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static void cpu_bus_init(struct device *dev)
diff --git a/src/northbridge/intel/gm45/gma.c b/src/northbridge/intel/gm45/gma.c
index 6a51daee7c..3d48ca2c2b 100644
--- a/src/northbridge/intel/gm45/gma.c
+++ b/src/northbridge/intel/gm45/gma.c
@@ -200,17 +200,13 @@ static const char *gma_acpi_name(const struct device *dev)
return "GFX0";
}
-static struct pci_operations gma_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations gma_func0_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.acpi_fill_ssdt = gma_generate_ssdt,
.init = gma_func0_init,
- .ops_pci = &gma_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
.acpi_name = gma_acpi_name,
};
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index 19341d4d37..68072ff359 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -502,17 +502,13 @@ static void gma_generate_ssdt(const struct device *dev)
drivers_intel_gma_displays_ssdt_generate(&chip->gfx);
}
-static struct pci_operations gma_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations gma_func0_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = gma_func0_init,
.acpi_fill_ssdt = gma_generate_ssdt,
- .ops_pci = &gma_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = {
diff --git a/src/northbridge/intel/haswell/minihd.c b/src/northbridge/intel/haswell/minihd.c
index f8a16e231f..71ca1e6cf5 100644
--- a/src/northbridge/intel/haswell/minihd.c
+++ b/src/northbridge/intel/haswell/minihd.c
@@ -85,16 +85,12 @@ static void minihd_init(struct device *dev)
}
}
-static struct pci_operations minihd_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations minihd_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = minihd_init,
- .ops_pci = &minihd_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = { 0x0a0c, 0x0c0c, 0 };
diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c
index c282aea044..ef7742e523 100644
--- a/src/northbridge/intel/haswell/northbridge.c
+++ b/src/northbridge/intel/haswell/northbridge.c
@@ -447,17 +447,13 @@ static void northbridge_init(struct device *dev)
MCHBAR32(MMIO_PAVP_MSG) = 0x00100001;
}
-static struct pci_operations intel_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations mc_ops = {
.read_resources = mc_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = northbridge_init,
.acpi_fill_ssdt = generate_cpu_entries,
- .ops_pci = &intel_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short mc_pci_device_ids[] = {
diff --git a/src/northbridge/intel/haswell/pcie.c b/src/northbridge/intel/haswell/pcie.c
index 74f11dde8c..a47a2f507c 100644
--- a/src/northbridge/intel/haswell/pcie.c
+++ b/src/northbridge/intel/haswell/pcie.c
@@ -47,10 +47,6 @@ static const char *pcie_acpi_name(const struct device *dev)
}
#endif
-static struct pci_operations pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations device_ops = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
@@ -59,7 +55,7 @@ static struct device_operations device_ops = {
.reset_bus = pci_bus_reset,
.disable = pcie_disable,
.init = pci_dev_init,
- .ops_pci = &pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = pcie_acpi_name,
#endif
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c
index 183c8f5b59..34d129d502 100644
--- a/src/northbridge/intel/i945/gma.c
+++ b/src/northbridge/intel/i945/gma.c
@@ -746,10 +746,6 @@ static const char *gma_acpi_name(const struct device *dev)
return "GFX0";
}
-static struct pci_operations gma_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations gma_func0_ops = {
.read_resources = gma_func0_read_resources,
.set_resources = pci_dev_set_resources,
@@ -757,7 +753,7 @@ static struct device_operations gma_func0_ops = {
.init = gma_func0_init,
.acpi_fill_ssdt = gma_generate_ssdt,
.disable = gma_func0_disable,
- .ops_pci = &gma_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
.acpi_name = gma_acpi_name,
};
@@ -767,7 +763,7 @@ static struct device_operations gma_func1_ops = {
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = gma_func1_init,
- .ops_pci = &gma_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short i945_gma_func0_ids[] = {
diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c
index 56cad7a971..0e8ea7e77e 100644
--- a/src/northbridge/intel/i945/northbridge.c
+++ b/src/northbridge/intel/i945/northbridge.c
@@ -174,16 +174,12 @@ static void mc_read_resources(struct device *dev)
}
}
-static struct pci_operations intel_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations mc_ops = {
.read_resources = mc_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.acpi_fill_ssdt = generate_cpu_entries,
- .ops_pci = &intel_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = {
diff --git a/src/northbridge/intel/ironlake/gma.c b/src/northbridge/intel/ironlake/gma.c
index 5ccf8a6a6b..8baccb2831 100644
--- a/src/northbridge/intel/ironlake/gma.c
+++ b/src/northbridge/intel/ironlake/gma.c
@@ -191,17 +191,13 @@ static void gma_generate_ssdt(const struct device *device)
drivers_intel_gma_displays_ssdt_generate(&chip->gfx);
}
-static struct pci_operations gma_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations gma_func0_ops = {
.read_resources = gma_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.acpi_fill_ssdt = gma_generate_ssdt,
.init = gma_func0_init,
- .ops_pci = &gma_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const unsigned short pci_device_ids[] = {
diff --git a/src/northbridge/intel/ironlake/northbridge.c b/src/northbridge/intel/ironlake/northbridge.c
index d98af9edc9..f53b03ea8b 100644
--- a/src/northbridge/intel/ironlake/northbridge.c
+++ b/src/northbridge/intel/ironlake/northbridge.c
@@ -227,17 +227,13 @@ static void ironlake_init(void *const chip_info)
}
-static struct pci_operations intel_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations mc_ops = {
.read_resources = mc_read_resources,
.set_resources = mc_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = northbridge_init,
.acpi_fill_ssdt = generate_cpu_entries,
- .ops_pci = &intel_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
};
static const struct pci_driver mc_driver_ard __pci_driver = {
diff --git a/src/northbridge/intel/pineview/gma.c b/src/northbridge/intel/pineview/gma.c
index 2f4b629ee6..e46bd7c7c2 100644
--- a/src/northbridge/intel/pineview/gma.c
+++ b/src/northbridge/intel/pineview/gma.c
@@ -263,16 +263,12 @@ static const char *gma_acpi_name(const struct device *dev)
return "GFX0";
}
-static struct pci_operations gma_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations gma_func0_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = gma_func0_init,
- .ops_pci = &gma_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
.acpi_name = gma_acpi_name,
};
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index 150b61c9b9..aa66f4ae84 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -646,10 +646,6 @@ static void gma_func0_disable(struct device *dev)
dev->enabled = 0;
}
-static struct pci_operations gma_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations gma_func0_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
@@ -657,7 +653,7 @@ static struct device_operations gma_func0_ops = {
.acpi_fill_ssdt = gma_generate_ssdt,
.init = gma_func0_init,
.disable = gma_func0_disable,
- .ops_pci = &gma_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
.acpi_name = gma_acpi_name,
};
diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c
index ce28c05fd4..1d20a4b57a 100644
--- a/src/northbridge/intel/sandybridge/northbridge.c
+++ b/src/northbridge/intel/sandybridge/northbridge.c
@@ -425,16 +425,12 @@ void northbridge_write_smram(u8 smram)
pci_write_config8(pcidev_on_root(0, 0), SMRAM, smram);
}
-static struct pci_operations intel_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations mc_ops = {
.read_resources = mc_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = northbridge_init,
- .ops_pci = &intel_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
.acpi_fill_ssdt = generate_cpu_entries,
};
diff --git a/src/northbridge/intel/sandybridge/pcie.c b/src/northbridge/intel/sandybridge/pcie.c
index f2b75d6ca6..d0b7fd5820 100644
--- a/src/northbridge/intel/sandybridge/pcie.c
+++ b/src/northbridge/intel/sandybridge/pcie.c
@@ -50,10 +50,6 @@ static const char *pcie_acpi_name(const struct device *dev)
}
#endif
-static struct pci_operations pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations device_ops = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
@@ -62,7 +58,7 @@ static struct device_operations device_ops = {
.reset_bus = pci_bus_reset,
.disable = pcie_disable,
.init = pci_dev_init,
- .ops_pci = &pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = pcie_acpi_name,
#endif
diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c
index ecbd63e616..d2d2bb067d 100644
--- a/src/northbridge/intel/x4x/gma.c
+++ b/src/northbridge/intel/x4x/gma.c
@@ -67,17 +67,13 @@ static const char *gma_acpi_name(const struct device *dev)
return "GFX0";
}
-static struct pci_operations gma_pci_ops = {
- .set_subsystem = pci_dev_set_subsystem,
-};
-
static struct device_operations gma_func0_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.acpi_fill_ssdt = gma_generate_ssdt,
.init = gma_func0_init,
- .ops_pci = &gma_pci_ops,
+ .ops_pci = &pci_dev_ops_pci,
.disable = gma_func0_disable,
.acpi_name = gma_acpi_name,
};