From 306ab6c6d56a121e48e6722ce65fe63f9efd0d4d Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sun, 22 Jul 2012 08:56:00 +0200 Subject: [PATCH] --- yaml --- r: 321186 b: refs/heads/master c: a9188bc1628366bea7157209df93acc0f74625cc h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/mips/lantiq/prom.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index fe7825658e18..31a3a7c97fd2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e29b72f5e129b4dd4b77dc01dba340006bb103f8 +refs/heads/master: a9188bc1628366bea7157209df93acc0f74625cc diff --git a/trunk/arch/mips/lantiq/prom.c b/trunk/arch/mips/lantiq/prom.c index d185e8477fdf..6cfd6117fbfd 100644 --- a/trunk/arch/mips/lantiq/prom.c +++ b/trunk/arch/mips/lantiq/prom.c @@ -8,7 +8,10 @@ #include #include +#include #include +#include + #include #include @@ -70,6 +73,25 @@ void __init plat_mem_setup(void) __dt_setup_arch(&__dtb_start); } +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(); + + /* free the space reserved for the dt blob */ + free_bootmem(base, size); +} + void __init prom_init(void) { /* call the soc specific detetcion code and get it to fill soc_info */