summaryrefslogtreecommitdiff
path: root/src/northbridge/intel
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-11-16 14:09:48 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-11-18 15:38:03 +0000
commit61f22cff5916dc528690721aa3aaa88f9c6576ad (patch)
tree82f9cea3be61269a1322acc8273fb27746e62ac5 /src/northbridge/intel
parent4c4d1948efd39afd2d15cc5efb86cc669cb155a3 (diff)
nb/intel/sandybridge: assign gma ops in chipset devicetree
Since the integrated GPU is always function 0 of device 2 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 and graphics works in UEFI Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: Patrick Rudolph <patrick.rudolph@9elements.com> Change-Id: I20e387e626e19dc441aceda18451186d1e86cd5f Reviewed-on: https://review.coreboot.org/c/coreboot/+/79114 Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r--src/northbridge/intel/sandybridge/chipset.cb2
-rw-r--r--src/northbridge/intel/sandybridge/gma.c15
2 files changed, 2 insertions, 15 deletions
diff --git a/src/northbridge/intel/sandybridge/chipset.cb b/src/northbridge/intel/sandybridge/chipset.cb
index 9fb1701076..38a53d54e1 100644
--- a/src/northbridge/intel/sandybridge/chipset.cb
+++ b/src/northbridge/intel/sandybridge/chipset.cb
@@ -14,7 +14,7 @@ chip northbridge/intel/sandybridge
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
- device pci 02.0 alias igd off end # vga controller
+ device pci 02.0 alias igd off ops sandybridge_gma_func0_ops end # vga controller
device pci 04.0 alias dev4 off end # Device 4
device pci 06.0 alias peg60 off end # PEG60
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index 3eed5cc9bc..2304a04688 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -640,7 +640,7 @@ static void gma_func0_disable(struct device *dev)
dev->enabled = 0;
}
-static struct device_operations gma_func0_ops = {
+struct device_operations sandybridge_gma_func0_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
@@ -650,16 +650,3 @@ static struct device_operations gma_func0_ops = {
.ops_pci = &pci_dev_ops_pci,
.acpi_name = gma_acpi_name,
};
-
-static const unsigned short pci_device_ids[] = {
- 0x0102, 0x0106, 0x010a, 0x0112,
- 0x0116, 0x0122, 0x0126, 0x0156,
- 0x0166, 0x0162, 0x016a, 0x0152,
- 0
-};
-
-static const struct pci_driver gma __pci_driver = {
- .ops = &gma_func0_ops,
- .vendor = PCI_VID_INTEL,
- .devices = pci_device_ids,
-};