MIPS: sead3: use unflatten_and_copy_device_tree()
authorQais Yousef <qais.yousef@imgtec.com>
Fri, 6 Dec 2013 11:00:45 +0000 (11:00 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 23 Jan 2014 12:02:36 +0000 (13:02 +0100)
we want the device tree to be unflattened into non init memory so it can be
accessed later by, for example, a probing function of a driver module.

Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6210/

arch/mips/mti-sead3/sead3-setup.c

index 541a90798d423c103bb322ef132f03c18803b39f..bf7fe48bf2f927dfef969233658968bfdcf79bbc 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/libfdt.h>
 #include <linux/of_platform.h>
 #include <linux/of_fdt.h>
-#include <linux/bootmem.h>
 
 #include <asm/prom.h>
 #include <asm/fw/fw.h>
@@ -98,18 +97,10 @@ void __init plat_mem_setup(void)
 
 void __init device_tree_init(void)
 {
-       unsigned long base, size;
-
        if (!initial_boot_params)
                return;
 
-       base = virt_to_phys((void *)initial_boot_params);
-       size = be32_to_cpu(initial_boot_params->totalsize);
-
-       /* Before we do anything, lets reserve the dt blob */
-       reserve_bootmem(base, size, BOOTMEM_DEFAULT);
-
-       unflatten_device_tree();
+       unflatten_and_copy_device_tree();
 }
 
 static int __init customize_machine(void)
This page took 0.024773 seconds and 5 git commands to generate.