Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 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/

authored by

Qais Yousef and committed by
Ralf Baechle
7e8a2762 187e7c5f

+1 -10
+1 -10
arch/mips/mti-sead3/sead3-setup.c
··· 10 10 #include <linux/libfdt.h> 11 11 #include <linux/of_platform.h> 12 12 #include <linux/of_fdt.h> 13 - #include <linux/bootmem.h> 14 13 15 14 #include <asm/prom.h> 16 15 #include <asm/fw/fw.h> ··· 97 98 98 99 void __init device_tree_init(void) 99 100 { 100 - unsigned long base, size; 101 - 102 101 if (!initial_boot_params) 103 102 return; 104 103 105 - base = virt_to_phys((void *)initial_boot_params); 106 - size = be32_to_cpu(initial_boot_params->totalsize); 107 - 108 - /* Before we do anything, lets reserve the dt blob */ 109 - reserve_bootmem(base, size, BOOTMEM_DEFAULT); 110 - 111 - unflatten_device_tree(); 104 + unflatten_and_copy_device_tree(); 112 105 } 113 106 114 107 static int __init customize_machine(void)