Commit 7e8a2762 authored by Qais Yousef's avatar Qais Yousef Committed by Ralf Baechle

MIPS: sead3: use unflatten_and_copy_device_tree()

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: default avatarQais Yousef <qais.yousef@imgtec.com>
Reviewed-by: default avatarPaul Burton <paul.burton@imgtec.com>
Reviewed-by: default avatarJames Hogan <james.hogan@imgtec.com>
Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6210/
parent 187e7c5f
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <linux/libfdt.h> #include <linux/libfdt.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <linux/bootmem.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/fw/fw.h> #include <asm/fw/fw.h>
...@@ -98,18 +97,10 @@ void __init plat_mem_setup(void) ...@@ -98,18 +97,10 @@ void __init plat_mem_setup(void)
void __init device_tree_init(void) void __init device_tree_init(void)
{ {
unsigned long base, size;
if (!initial_boot_params) if (!initial_boot_params)
return; return;
base = virt_to_phys((void *)initial_boot_params); unflatten_and_copy_device_tree();
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();
} }
static int __init customize_machine(void) static int __init customize_machine(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment