Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756675Ab3JGQew (ORCPT ); Mon, 7 Oct 2013 12:34:52 -0400 Received: from mail-yh0-f54.google.com ([209.85.213.54]:33920 "EHLO mail-yh0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756227Ab3JGQaB (ORCPT ); Mon, 7 Oct 2013 12:30:01 -0400 From: Rob Herring To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Grant Likely , Rob Herring , Chris Zankel , linux-xtensa@linux-xtensa.org Subject: [PATCH v2 07/29] xtensa: use unflatten_and_copy_device_tree Date: Mon, 7 Oct 2013 11:29:15 -0500 Message-Id: <1381163377-21044-8-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1381163377-21044-1-git-send-email-robherring2@gmail.com> References: <1381163377-21044-1-git-send-email-robherring2@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1907 Lines: 68 From: Rob Herring Use the common unflatten_and_copy_device_tree to copy the built-in FDT out of init section. Signed-off-by: Rob Herring Cc: Chris Zankel Acked-by: Max Filippov Cc: linux-xtensa@linux-xtensa.org Acked-by: Grant Likely --- arch/xtensa/kernel/setup.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 946fb8d..fc31ec1 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -21,11 +21,8 @@ #include #include #include - -#ifdef CONFIG_OF #include #include -#endif #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) # include @@ -252,17 +249,6 @@ void __init early_init_devtree(void *params) of_scan_flat_dt(early_init_dt_scan_memory, NULL); } -static void __init copy_devtree(void) -{ - void *alloc = early_init_dt_alloc_memory_arch( - be32_to_cpu(initial_boot_params->totalsize), 8); - if (alloc) { - memcpy(alloc, initial_boot_params, - be32_to_cpu(initial_boot_params->totalsize)); - initial_boot_params = alloc; - } -} - static int __init xtensa_device_probe(void) { of_platform_populate(NULL, NULL, NULL, NULL); @@ -525,10 +511,7 @@ void __init setup_arch(char **cmdline_p) bootmem_init(); -#ifdef CONFIG_OF - copy_devtree(); - unflatten_device_tree(); -#endif + unflatten_and_copy_device_tree(); platform_setup(cmdline_p); -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/