[coreboot] r577 - coreboot-v3/southbridge/amd/cs5536

svn at coreboot.org svn at coreboot.org
Thu Feb 7 17:17:21 CET 2008

Author: rminnich
Date: 2008-02-07 17:17:21 +0100 (Thu, 07 Feb 2008)
New Revision: 577

This is a subtle error. An operations struct, to work as a constructor, must initialize 
the .constructor struct member. 

This error is so subtle that we might consider changing the device code; or at least 
working on the documentation to make it more clear. The key question: do we ever want 
an operations struct that can NOT operate as a device constructor? When this code was 
designed over a year ago, it seemed that we might; now, it is not so certain. 

Signed-off-by: Ronald G. Minnich <rminnich at gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Modified: coreboot-v3/southbridge/amd/cs5536/cs5536.c
--- coreboot-v3/southbridge/amd/cs5536/cs5536.c	2008-02-07 16:09:24 UTC (rev 576)
+++ coreboot-v3/southbridge/amd/cs5536/cs5536.c	2008-02-07 16:17:21 UTC (rev 577)
@@ -618,6 +618,7 @@
 		outl(0xDEADBEEF, 0xCFC);
+	printk(BIOS_SPEW, "cs5536: %s() Exit\n", __FUNCTION__);
@@ -631,9 +632,11 @@
 	printk(BIOS_SPEW, "cs5536: %s()\n", __FUNCTION__);
+	printk(BIOS_SPEW, "cs5536: %s() Exit\n", __FUNCTION__);
 static struct device_operations southbridge_ops = {
+	.constructor			= default_device_constructor,
 	.phase3_scan			= scan_static_bus,
 	.phase4_read_resources		= pci_dev_read_resources,
 	.phase4_set_resources		= pci_dev_set_resources,

More information about the coreboot mailing list