xref: /openbmc/linux/arch/microblaze/kernel/prom.c (revision 31af04cd)
1 /*
2  * Procedures for creating, accessing and interpreting the device tree.
3  *
4  * Paul Mackerras	August 1996.
5  * Copyright (C) 1996-2005 Paul Mackerras.
6  *
7  *  Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner.
8  *    {engebret|bergner}@us.ibm.com
9  *
10  *      This program is free software; you can redistribute it and/or
11  *      modify it under the terms of the GNU General Public License
12  *      as published by the Free Software Foundation; either version
13  *      2 of the License, or (at your option) any later version.
14  */
15 
16 #include <linux/kernel.h>
17 #include <linux/string.h>
18 #include <linux/memblock.h>
19 #include <linux/of_fdt.h>
20 
21 void __init early_init_devtree(void *params)
22 {
23 	pr_debug(" -> early_init_devtree(%p)\n", params);
24 
25 	early_init_dt_scan(params);
26 	if (!strlen(boot_command_line))
27 		strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
28 
29 	memblock_allow_resize();
30 
31 	pr_debug("Phys. mem: %lx\n", (unsigned long) memblock_phys_mem_size());
32 
33 	pr_debug(" <- early_init_devtree()\n");
34 }
35