[coreboot] r931 - coreboot-v3/util/dtc
svn at coreboot.org
svn at coreboot.org
Wed Oct 15 19:46:52 CEST 2008
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 <mylesgw at gmail.com>
Acked-by: Ronald G. Minnich <rminnich at gmail.com>
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);
More information about the coreboot
mailing list