Thread (26 messages) 26 messages, 8 authors, 2010-07-30

Re: [PATCH V4] powerpc/prom: Export device tree physical address via proc

From: Segher Boessenkool <hidden>
Date: 2010-07-14 15:34:36

V4: Fixed misspelling
Any particular reason you fixed only one of the two
mispelings I pointed out?  (device tree is two words,
not one).
+	prop = of_find_property(node, "linux,devicetree-start", NULL);
+	if (prop)
+		prom_remove_property(node, prop);
+
+	prop = of_find_property(node, "linux,devicetree-end", NULL);
+	if (prop)
+		prom_remove_property(node, prop);
+
+	flat_dt_start = virt_to_phys(initial_boot_params);
+	flat_dt_end = virt_to_phys(initial_boot_params)
+				+ initial_boot_params->totalsize;
+	prom_add_property(node, &flat_dt_start_prop);
+	prom_add_property(node, &flat_dt_end_prop);
You could use one property instead of two; use addr+len
like every other property does.

You also should use a better name for the property; is this
the previous kernel's device tree?  Just "device-tree" makes
no sense, it is not pointing to "the" device tree for sure!


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help