[SPARC64]: Convert sparc64 PCI layer to in-kernel device tree.

One thing this change pointed out was that we really should
pull the "get 'local-mac-address' property" logic into a helper
function all the network drivers can call.

Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index 0a32b10..fb112c3 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -20,6 +20,7 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/bootmem.h>
+#include <linux/module.h>
 
 #include <asm/prom.h>
 #include <asm/oplib.h>
@@ -63,6 +64,17 @@
 	return np;
 }
 
+struct device_node *of_find_node_by_phandle(phandle handle)
+{
+	struct device_node *np;
+
+	for (np = allnodes; np != 0; np = np->allnext)
+		if (np->node == handle)
+			break;
+
+	return np;
+}
+
 struct device_node *of_find_node_by_name(struct device_node *from,
 	const char *name)
 {
@@ -103,6 +115,18 @@
 	}
 	return pp;
 }
+EXPORT_SYMBOL(of_find_property);
+
+/*
+ * Find a property with a given name for a given node
+ * and return the value.
+ */
+void *of_get_property(struct device_node *np, const char *name, int *lenp)
+{
+	struct property *pp = of_find_property(np,name,lenp);
+	return pp ? pp->value : NULL;
+}
+EXPORT_SYMBOL(of_get_property);
 
 int of_getintprop_default(struct device_node *np, const char *name, int def)
 {
@@ -115,6 +139,7 @@
 
 	return *(int *) prop->value;
 }
+EXPORT_SYMBOL(of_getintprop_default);
 
 static unsigned int prom_early_allocated;