summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-11-07 10:04:56 +0100
committerArthur Heymans <arthur@aheymans.xyz>2022-12-01 10:28:10 +0000
commit1eecb8c814fa05e9902ddcb139a6e8b3a226ffa6 (patch)
tree5897829e5767fcf0d7f27c51b355b9027c2e64c8 /src/northbridge
parent22d6ee8d9cda51d20ca4173593b9574f7dac65ff (diff)
nb/intel/x4x: Hook up PCI domain and CPU bus ops to devicetree
Change-Id: I0a7b3167392c152da6459dfc202ef11b2e61400a Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69295 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/x4x/northbridge.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c
index ac276b69d4..da046d1697 100644
--- a/src/northbridge/intel/x4x/northbridge.c
+++ b/src/northbridge/intel/x4x/northbridge.c
@@ -144,7 +144,7 @@ void northbridge_write_smram(u8 smram)
pci_write_config8(dev, D0F0_SMRAM, smram);
}
-static struct device_operations pci_domain_ops = {
+struct device_operations x4x_pci_domain_ops = {
.read_resources = mch_domain_read_resources,
.set_resources = mch_domain_set_resources,
.init = mch_domain_init,
@@ -154,21 +154,12 @@ static struct device_operations pci_domain_ops = {
.acpi_name = northbridge_acpi_name,
};
-static struct device_operations cpu_bus_ops = {
+struct device_operations x4x_cpu_bus_ops = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.init = mp_cpu_bus_init,
};
-static void enable_dev(struct device *dev)
-{
- /* Set the operations if it is a special bus type */
- if (dev->path.type == DEVICE_PATH_DOMAIN)
- dev->ops = &pci_domain_ops;
- else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER)
- dev->ops = &cpu_bus_ops;
-}
-
static void hide_pci_fn(const int dev_bit_base, const struct device *dev)
{
if (!dev || dev->enabled)
@@ -201,6 +192,5 @@ static void x4x_init(void *const chip_info)
struct chip_operations northbridge_intel_x4x_ops = {
CHIP_NAME("Intel 4-Series Northbridge")
- .enable_dev = enable_dev,
.init = x4x_init,
};