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>
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
Reference in New Issue
Block a user