summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/ironlake/gma.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/intel/ironlake/gma.c')
-rw-r--r--src/northbridge/intel/ironlake/gma.c36
1 files changed, 11 insertions, 25 deletions
diff --git a/src/northbridge/intel/ironlake/gma.c b/src/northbridge/intel/ironlake/gma.c
index b35305b0c1..6dbc156b98 100644
--- a/src/northbridge/intel/ironlake/gma.c
+++ b/src/northbridge/intel/ironlake/gma.c
@@ -214,25 +214,11 @@ static void gma_read_resources(struct device *dev)
res->size = (resource_t) 0x10000000;
}
-const struct i915_gpu_controller_info *
-intel_gma_get_controller_info(void)
+static void gma_generate_ssdt(struct device *device)
{
- struct device *dev = pcidev_on_root(0x2, 0);
- if (!dev) {
- return NULL;
- }
- struct northbridge_intel_ironlake_config *chip = dev->chip_info;
- return &chip->gfx;
-}
-
-static void gma_ssdt(struct device *device)
-{
- const struct i915_gpu_controller_info *gfx = intel_gma_get_controller_info();
- if (!gfx) {
- return;
- }
+ const struct northbridge_intel_ironlake_config *chip = device->chip_info;
- drivers_intel_gma_displays_ssdt_generate(gfx);
+ drivers_intel_gma_displays_ssdt_generate(&chip->gfx);
}
static unsigned long
@@ -266,14 +252,14 @@ static struct pci_operations gma_pci_ops = {
};
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_ssdt,
- .init = gma_func0_init,
- .scan_bus = 0,
- .enable = 0,
- .ops_pci = &gma_pci_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,
+ .scan_bus = 0,
+ .enable = 0,
+ .ops_pci = &gma_pci_ops,
.write_acpi_tables = gma_write_acpi_tables,
};