Try this, simplifies the dts, removes redundant ids.
might even allow us to totally yank the pciid, domainid, etc. keywords
ron
This is a proposal in response to Peter and Stefan's comments.
I think they are correct.
Basically, this patch gets rid of the constructor arrays in the
various .c files, and seperates them into individual structs. I don't
see this as a huge problem, because there are still so few of them.
This separation of contructors allows us, in the dts,
to exactly specify WHICH constructor we are using, not just
the name of an array.
That change in turn allows us to just name the constructor, and
not name the vendor and device, because we are exactly specifying
the constructor, not just an array of constructors.
This change simplifies the dts and will, in turn, simplify other code
This is not signed off, because it will cause other code to change (in
minor ways); I need comments on the direction. Should we do this?
Index: northbridge/amd/geodelx/domain
===================================================================
--- northbridge/amd/geodelx/domain (revision 592)
+++ northbridge/amd/geodelx/domain (working copy)
@@ -19,7 +19,6 @@
*/
{
- constructor = "geodelx_north_constructors";
- domainid = "PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LXBRIDGE";
+ constructor = "geodelx_north_domain";
};
Index: northbridge/amd/geodelx/geodelx.c
===================================================================
--- northbridge/amd/geodelx/geodelx.c (revision 592)
+++ northbridge/amd/geodelx/geodelx.c (working copy)
@@ -354,24 +354,23 @@
* The constructor for the device.
* Domain ops and APIC cluster ops and PCI device ops are different.
*/
-struct constructor geodelx_north_constructors[] = {
+struct constructor geodelx_north_domain = {
/* Northbridge running a PCI domain. */
- {.id = {.type = DEVICE_ID_PCI_DOMAIN,
+ .id = {.type = DEVICE_ID_PCI_DOMAIN,
.u = {.pci_domain = {.vendor = PCI_VENDOR_ID_AMD,
.device = PCI_DEVICE_ID_AMD_LXBRIDGE}}},
.ops = &geodelx_pcidomain_ops},
+ geodelx_north_apic = {
/* Northbridge running an APIC cluster. */
- {.id = {.type = DEVICE_ID_APIC_CLUSTER,
+ .id = {.type = DEVICE_ID_APIC_CLUSTER,
.u = {.apic_cluster = {.vendor = PCI_VENDOR_ID_AMD,
.device = PCI_DEVICE_ID_AMD_LXBRIDGE}}},
.ops = &geodelx_apic_ops},
/* Northbridge running a PCI device. */
- {.id = {.type = DEVICE_ID_PCI,
+ geodelx_north_pci = {
+ .id = {.type = DEVICE_ID_PCI,
.u = {.pci = {.vendor = PCI_VENDOR_ID_AMD,
.device = PCI_DEVICE_ID_AMD_LXBRIDGE}}},
- .ops = &geodelx_pci_ops},
-
- {.ops = 0},
-};
+ .ops = &geodelx_pci_ops};
--
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot