Skip to content

Commit

Permalink
nb/intel/sandybridge: assign host bridge ops in chipset devicetree
Browse files Browse the repository at this point in the history
Since the host bridge is always function 0 of device 0 on bus 0, the
device operations can be statically assigned in the devicetree and
there's no need to bind the host bridge device operations to the PCI
device during runtime via a list of PCI IDs.

TEST=Lenovo X220 still boots to Linux

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Change-Id: Icf3d9f8cd2be2f8ef71fd9fdb5f005f3b683332e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79113
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
  • Loading branch information
felixheld committed Nov 18, 2023
1 parent c8dc4a3 commit 4c4d194
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/northbridge/intel/sandybridge/chipset.cb
Expand Up @@ -10,7 +10,7 @@ chip northbridge/intel/sandybridge
end
device domain 0 on
ops sandybridge_pci_domain_ops
device pci 00.0 alias host_bridge on end # host bridge
device pci 00.0 alias host_bridge on ops sandybridge_host_bridge_ops end
device pci 01.0 alias peg10 off end # PEG10
device pci 01.1 alias peg11 off end # PEG11
device pci 01.2 alias peg12 off end # PEG12
Expand Down
14 changes: 1 addition & 13 deletions src/northbridge/intel/sandybridge/northbridge.c
Expand Up @@ -390,7 +390,7 @@ static void mc_gen_ssdt(const struct device *dev)
set_above_4g_pci(dev);
}

static struct device_operations mc_ops = {
struct device_operations sandybridge_host_bridge_ops = {
.read_resources = mc_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
Expand All @@ -399,18 +399,6 @@ static struct device_operations mc_ops = {
.acpi_fill_ssdt = mc_gen_ssdt,
};

static const unsigned short pci_device_ids[] = {
0x0100, 0x0104, 0x0108, /* Sandy Bridge */
0x0150, 0x0154, 0x0158, /* Ivy Bridge */
0
};

static const struct pci_driver mc_driver __pci_driver = {
.ops = &mc_ops,
.vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
};

struct device_operations sandybridge_cpu_bus_ops = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
Expand Down

0 comments on commit 4c4d194

Please sign in to comment.