diff options
Diffstat (limited to 'arch/mips/lantiq/prom.c')
| -rw-r--r-- | arch/mips/lantiq/prom.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c index d185e8477fd..7447d322d14 100644 --- a/arch/mips/lantiq/prom.c +++ b/arch/mips/lantiq/prom.c @@ -8,9 +8,13 @@ #include <linux/export.h> #include <linux/clk.h> +#include <linux/bootmem.h> #include <linux/of_platform.h> +#include <linux/of_fdt.h> + #include <asm/bootinfo.h> #include <asm/time.h> +#include <asm/prom.h> #include <lantiq.h> @@ -67,7 +71,12 @@ void __init plat_mem_setup(void) * Load the builtin devicetree. This causes the chosen node to be * parsed resulting in our memory appearing */ - __dt_setup_arch(&__dtb_start); + __dt_setup_arch(__dtb_start); +} + +void __init device_tree_init(void) +{ + unflatten_and_copy_device_tree(); } void __init prom_init(void) @@ -93,11 +102,11 @@ int __init plat_of_setup(void) if (!of_have_populated_dt()) panic("device tree not present"); - strncpy(of_ids[0].compatible, soc_info.compatible, + strlcpy(of_ids[0].compatible, soc_info.compatible, sizeof(of_ids[0].compatible)); strncpy(of_ids[1].compatible, "simple-bus", sizeof(of_ids[1].compatible)); - return of_platform_bus_probe(NULL, of_ids, NULL); + return of_platform_populate(NULL, of_ids, NULL, NULL); } arch_initcall(plat_of_setup); |
