xref: /linux/arch/microblaze/kernel/prom.c (revision 7f71507851fc7764b36a3221839607d3a45c2025)
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, __pa(params));
22 	if (!strlen(boot_command_line))
23 		strscpy(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