[coreboot] Patch set updated for coreboot: d7c5f67 Drop invalid device ops on Agesa northbridge

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Sat Jul 7 21:55:19 CEST 2012


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1180

-gerrit

commit d7c5f67d76a7995ac4f0667ab7a875c60f583799
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Fri Jul 6 17:27:37 2012 +0300

    Drop invalid device ops on Agesa northbridge
    
    One could not pass a device of type APIC to PCI resource functions.
    The correct CPU model specific cpu->ops is set at later time in
    cpu_initialize().
    
    Change-Id: Ifa274185e4db3080433c1f07e3a48f2b55c0514f
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/northbridge/amd/agesa/family10/northbridge.c   |   18 ------------------
 src/northbridge/amd/agesa/family15/northbridge.c   |   18 ------------------
 src/northbridge/amd/agesa/family15tn/northbridge.c |   18 ------------------
 3 files changed, 0 insertions(+), 54 deletions(-)

diff --git a/src/northbridge/amd/agesa/family10/northbridge.c b/src/northbridge/amd/agesa/family10/northbridge.c
index 7b73987..3088f54 100644
--- a/src/northbridge/amd/agesa/family10/northbridge.c
+++ b/src/northbridge/amd/agesa/family10/northbridge.c
@@ -1231,21 +1231,6 @@ static void add_more_links(device_t dev, unsigned total_links)
 	last->next = NULL;
 }
 
-/* dummy read_resources */
-static void lapic_read_resources(device_t dev)
-{
-}
-
-static struct device_operations lapic_ops = {
-        .read_resources   = lapic_read_resources,
-        .set_resources    = pci_dev_set_resources,
-        .enable_resources = pci_dev_enable_resources,
-        .init             = 0,
-        .scan_bus         = 0,
-        .enable           = 0,
-        .ops_pci          = 0,
-};
-
 static u32 cpu_bus_scan(device_t dev, u32 max)
 {
 	struct bus *cpu_bus;
@@ -1447,9 +1432,6 @@ static u32 cpu_bus_scan(device_t dev, u32 max)
 			if (cpu) {
 				cpu->path.apic.node_id = i;
 				cpu->path.apic.core_id = j;
-				if (cpu->path.type == DEVICE_PATH_APIC) {
-					cpu->ops = &lapic_ops;
-				}
 				printk(BIOS_DEBUG, "CPU: %s %s\n",
 					dev_path(cpu), cpu->enabled?"enabled":"disabled");
 			}
diff --git a/src/northbridge/amd/agesa/family15/northbridge.c b/src/northbridge/amd/agesa/family15/northbridge.c
index 130086e..5b22707 100644
--- a/src/northbridge/amd/agesa/family15/northbridge.c
+++ b/src/northbridge/amd/agesa/family15/northbridge.c
@@ -889,21 +889,6 @@ static void add_more_links(device_t dev, unsigned total_links)
 	last->next = NULL;
 }
 
-/* dummy read_resources */
-static void lapic_read_resources(device_t dev)
-{
-}
-
-static struct device_operations lapic_ops = {
-	.read_resources   = lapic_read_resources,
-	.set_resources    = pci_dev_set_resources,
-	.enable_resources = pci_dev_enable_resources,
-	.init             = 0,
-	.scan_bus         = 0,
-	.enable           = 0,
-	.ops_pci          = 0,
-};
-
 static u32 cpu_bus_scan(device_t dev, u32 max)
 {
 	struct bus *cpu_bus;
@@ -1100,9 +1085,6 @@ static u32 cpu_bus_scan(device_t dev, u32 max)
 			if (cpu) {
 				cpu->path.apic.node_id = i;
 				cpu->path.apic.core_id = j;
-				if (cpu->path.type == DEVICE_PATH_APIC) {
-					cpu->ops = &lapic_ops;
-				}
 				printk(BIOS_DEBUG, "CPU: %s %s\n",
 					dev_path(cpu), cpu->enabled?"enabled":"disabled");
 			}
diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c
index 3df5c60..d967793 100644
--- a/src/northbridge/amd/agesa/family15tn/northbridge.c
+++ b/src/northbridge/amd/agesa/family15tn/northbridge.c
@@ -873,21 +873,6 @@ static void add_more_links(device_t dev, unsigned total_links)
 	last->next = NULL;
 }
 
-/* dummy read_resources */
-static void lapic_read_resources(device_t dev)
-{
-}
-
-static struct device_operations lapic_ops = {
-	.read_resources   = lapic_read_resources,
-	.set_resources    = pci_dev_set_resources,
-	.enable_resources = pci_dev_enable_resources,
-	.init             = 0,
-	.scan_bus         = 0,
-	.enable           = 0,
-	.ops_pci          = 0,
-};
-
 static u32 cpu_bus_scan(device_t dev, u32 max)
 {
 	struct bus *cpu_bus;
@@ -1084,9 +1069,6 @@ static u32 cpu_bus_scan(device_t dev, u32 max)
 			if (cpu) {
 				cpu->path.apic.node_id = i;
 				cpu->path.apic.core_id = j;
-				if (cpu->path.type == DEVICE_PATH_APIC) {
-					cpu->ops = &lapic_ops;
-				}
 				printk(BIOS_DEBUG, "CPU: %s %s\n",
 					dev_path(cpu), cpu->enabled?"enabled":"disabled");
 			}




More information about the coreboot mailing list