linux-mips
[Top] [All Lists]

[PATCH 4/4] sead3: use unflatten_and_copy_device_tree()

To: <linux-mips@linux-mips.org>
Subject: [PATCH 4/4] sead3: use unflatten_and_copy_device_tree()
From: Qais Yousef <qais.yousef@imgtec.com>
Date: Fri, 6 Dec 2013 11:00:45 +0000
Cc: Qais Yousef <qais.yousef@imgtec.com>
In-reply-to: <1386327645-17571-1-git-send-email-qais.yousef@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1386327645-17571-1-git-send-email-qais.yousef@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
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>
---
 arch/mips/mti-sead3/sead3-setup.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/arch/mips/mti-sead3/sead3-setup.c 
b/arch/mips/mti-sead3/sead3-setup.c
index 541a907..bf7fe48 100644
--- a/arch/mips/mti-sead3/sead3-setup.c
+++ b/arch/mips/mti-sead3/sead3-setup.c
@@ -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)
-- 
1.7.1



<Prev in Thread] Current Thread [Next in Thread>