This patch adds more path support to coreboot and to the dtc.

This support in turn reduces annoying warning messages as coreboot comes up.

ron
These changes extend support for paths for devices. 

path.h: add superio path
alix1c/dts: add paths for each component.
device/device_util.c: add support for superio path.
flattree.c: add support for creating paths. 

How should this really be done? I'd be happier (much) if we could 
just say "path" in any given node and somehow have Magic
figure out what the path type was. This is really easy to fix 
as soon as some smart person figures it out, so I think we should move
forward with these changes until we get it. Plus, we may never figure 
it out.

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


Index: include/device/path.h
===================================================================
--- include/device/path.h	(revision 581)
+++ include/device/path.h	(working copy)
@@ -29,6 +29,7 @@
 	DEVICE_PATH_APIC_CLUSTER,
 	DEVICE_PATH_CPU,
 	DEVICE_PATH_CPU_BUS,
+	DEVICE_PATH_SUPERIO,
 };
 
 struct pci_domain_path
@@ -74,7 +75,12 @@
 	unsigned id;
 };
 
+struct superio_path
+{
+	unsigned iobase;
+};
 
+
 struct device_path {
 	enum device_path_type type;
 	union {
@@ -86,6 +92,7 @@
 		struct apic_cluster_path apic_cluster;
 		struct cpu_path          cpu;
 		struct cpu_bus_path      cpu_bus;
+		struct superio_path	superio;
 	} u;
 };
 
Index: mainboard/pcengines/alix1c/dts
===================================================================
--- mainboard/pcengines/alix1c/dts	(revision 582)
+++ mainboard/pcengines/alix1c/dts	(working copy)
@@ -23,10 +23,12 @@
 	mainboard-vendor = "PC Engines";
 	mainboard-name = "ALIX1.C";
 	cpus {
+		cpupath="0";
 		enabled;
 	};
 	apic {
 		/config/("northbridge/amd/geodelx/apic");
+		apicpath="0,0,0";
 		enabled;
 	};
 	domain0 {
@@ -56,6 +58,7 @@
 		};
 		superio {
 			/config/("superio/winbond/w83627hf/dts");
+			superiopath = "0x2e";
 			com1enable = "1";
 		};
 	};
Index: device/device_util.c
===================================================================
--- device/device_util.c	(revision 581)
+++ device/device_util.c	(working copy)
@@ -232,6 +232,10 @@
 			sprintf(buffer, "CPU_BUS: %02x",
 				dev->path.u.cpu_bus.id);
 			break;
+		case DEVICE_PATH_SUPERIO:
+			sprintf(buffer, "SUPERIO: %02x",
+				dev->path.u.superio.iobase);
+			break;
 		default:
 			printk(BIOS_ERR, "%s: Unknown device path type: %d\n",
 			       dev->dtsname, dev->path.type);
Index: util/dtc/flattree.c
===================================================================
--- util/dtc/flattree.c	(revision 581)
+++ util/dtc/flattree.c	(working copy)
@@ -564,6 +564,14 @@
 	 * and some are just set directly into the code (e.g. ops_pci).
 	 */
 	for_each_property(tree, prop) {
+		if (streq(prop->name, "cpupath")){
+			fprintf(f, "\t.path = {.type=DEVICE_PATH_CPU,.u={.cpu={ .id = %s }}},\n", 
+				prop->val.val);
+		}
+		if (streq(prop->name, "apicpath")){
+			fprintf(f, "\t.path = {.type=DEVICE_PATH_APIC,.u={.apic={ %s }}},\n", 
+				prop->val.val);
+		}
 		if (streq(prop->name, "pcidomain")){
 			fprintf(f, "\t.path = {.type=DEVICE_PATH_PCI_DOMAIN,.u={.pci_domain={ .domain = %s }}},\n", 
 				prop->val.val);
@@ -572,6 +580,10 @@
 			fprintf(f, "\t.path = {.type=DEVICE_PATH_PCI,.u={.pci={ .devfn = PCI_DEVFN(%s)}}},\n", 
 				prop->val.val);
 		}
+		if (streq(prop->name, "superiopath")){
+			fprintf(f, "\t.path = {.type=DEVICE_PATH_SUPERIO,.u={.superio={.iobase=%s}}},\n", 
+				prop->val.val);
+		}
 		/* to do: check the value, maybe. Kinda pointless though. */
 		if (streq(prop->name, "on_mainboard")){
 			fprintf(f, "\t.on_mainboard = 1,\n");
-- 
coreboot mailing list
coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to