Author: myles
Date: 2008-10-15 19:46:52 +0200 (Wed, 15 Oct 2008)
New Revision: 931

Modified:
   coreboot-v3/util/dtc/flattree.c
Log:
Change statictree emit function to emit path correctly for cpus.

Signed-off-by: Myles Watson <[EMAIL PROTECTED]>
Acked-by: Ronald G. Minnich <[EMAIL PROTECTED]>


Modified: coreboot-v3/util/dtc/flattree.c
===================================================================
--- coreboot-v3/util/dtc/flattree.c     2008-10-15 15:06:18 UTC (rev 930)
+++ coreboot-v3/util/dtc/flattree.c     2008-10-15 17:46:52 UTC (rev 931)
@@ -572,14 +572,15 @@
                fprintf(f, "\t.path =  { .type = DEVICE_PATH_ROOT },\n");
        }
 
+       /* special case -- cpus don't have an @ */
+       if (tree->name && !strncmp(tree->name, "cpus", 4)){
+               fprintf(f, "\t.path = {.type=DEVICE_PATH_CPU},\n");
+       }
+
        /* from the node names (tree->name) we derive the path */
        path = index(tree->name, '@');
        if (path && path[1]) {
                path++;
-               if (!strncmp(tree->name, "cpu", 3)){
-                       fprintf(f, "\t.path = {.type=DEVICE_PATH_CPU,{.cpu={ 
.id = 0x%s }}},\n", 
-                               path);
-               }
                if (!strncmp(tree->name, "bus", 3)){
                        fprintf(f, "\t.path = 
{.type=DEVICE_PATH_PCI_BUS,{.pci_bus={ .bus = 0x%s }}},\n", 
                                path);


--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to