xref: /linux/arch/microblaze/kernel/prom.c (revision 3bdab16c55f57a24245c97d707241dd9b48d1a91)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Procedures for creating, accessing and interpreting the device tree.
4  *
5  * Paul Mackerras	August 1996.
6  * Copyright (C) 1996-2005 Paul Mackerras.
7  *
8  *  Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner.
9  *    {engebret|bergner}@us.ibm.com
10  */
11 
12 #include <linux/kernel.h>
13 #include <linux/string.h>
14 #include <linux/memblock.h>
15 #include <linux/of_fdt.h>
16 
17 void __init early_init_devtree(void *params)
18 {
19 	pr_debug(" -> early_init_devtree(%p)\n", params);
20 
21 	early_init_dt_scan(params);
22 	if (!strlen(boot_command_line))
23 		strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
24 
25 	memblock_allow_resize();
26 
27 	pr_debug("Phys. mem: %lx\n", (unsigned long) memblock_phys_mem_size());
28 
29 	pr_debug(" <- early_init_devtree()\n");
30 }
31