dtc: Implement path references

This patch extends dtc syntax to allow references (&label, or
&{/full/path}) directly within property definitions, rather than
inside a cell list.  Such references are expanded to the full path of
the referenced node, as a string, instead of to a phandle as
references within cell lists are evaluated.

A testcase is also included.

Signed-off-by: David Gibson <[email protected]>
diff --git a/data.c b/data.c
index 3c4ab87..a94718c 100644
--- a/data.c
+++ b/data.c
@@ -202,6 +202,21 @@
 	return d;
 }
 
+struct data data_insert_at_marker(struct data d, struct marker *m,
+				  const void *p, int len)
+{
+	d = data_grow_for(d, len);
+	memmove(d.val + m->offset + len, d.val + m->offset, d.len - m->offset);
+	memcpy(d.val + m->offset, p, len);
+	d.len += len;
+
+	/* Adjust all markers after the one we're inserting at */
+	m = m->next;
+	for_each_marker(m)
+		m->offset += len;
+	return d;
+}
+
 struct data data_append_markers(struct data d, struct marker *m)
 {
 	struct marker **mp = &d.markers;