of/flattree: merge dt_mem_next_cell
authorGrant Likely <grant.likely@secretlab.ca>
Tue, 24 Nov 2009 10:37:56 +0000 (03:37 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 10 Dec 2009 22:23:15 +0000 (15:23 -0700)
Merge common code between PowerPC and Microblaze

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
arch/microblaze/kernel/prom.c
arch/powerpc/kernel/prom.c
drivers/of/fdt.c
include/linux/of_fdt.h

index 189179a..e0f4c34 100644 (file)
@@ -155,14 +155,6 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
        return 1;
 }
 
-static u64 __init dt_mem_next_cell(int s, cell_t **cellp)
-{
-       cell_t *p = *cellp;
-
-       *cellp = p + s;
-       return of_read_number(p, s);
-}
-
 static int __init early_init_dt_scan_memory(unsigned long node,
                                const char *uname, int depth, void *data)
 {
index 78f65a4..048e3a3 100644 (file)
@@ -432,14 +432,6 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
        return 1;
 }
 
-static u64 __init dt_mem_next_cell(int s, cell_t **cellp)
-{
-       cell_t *p = *cellp;
-
-       *cellp = p + s;
-       return of_read_number(p, s);
-}
-
 #ifdef CONFIG_PPC_PSERIES
 /*
  * Interpret the ibm,dynamic-memory property in the
index be200be..ebce509 100644 (file)
@@ -432,6 +432,14 @@ int __init early_init_dt_scan_root(unsigned long node, const char *uname,
        return 1;
 }
 
+u64 __init dt_mem_next_cell(int s, u32 **cellp)
+{
+       u32 *p = *cellp;
+
+       *cellp = p + s;
+       return of_read_number(p, s);
+}
+
 /**
  * unflatten_device_tree - create tree of device_nodes from flat blob
  *
index 828c3cd..d1a37e5 100644 (file)
@@ -72,6 +72,7 @@ extern void *of_get_flat_dt_prop(unsigned long node, const char *name,
 extern int of_flat_dt_is_compatible(unsigned long node, const char *name);
 extern unsigned long of_get_flat_dt_root(void);
 extern void early_init_dt_check_for_initrd(unsigned long node);
+extern u64 dt_mem_next_cell(int s, u32 **cellp);
 
 /* Early flat tree scan hooks */
 extern int early_init_dt_scan_root(unsigned long node, const char *uname,