2019-05-26 23:55:01 -07:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2009-03-27 06:25:12 -07:00
|
|
|
/*
|
|
|
|
* Procedures for creating, accessing and interpreting the device tree.
|
|
|
|
*
|
|
|
|
* Paul Mackerras August 1996.
|
|
|
|
* Copyright (C) 1996-2005 Paul Mackerras.
|
|
|
|
*
|
|
|
|
* Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner.
|
|
|
|
* {engebret|bergner}@us.ibm.com
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/string.h>
|
2010-07-11 21:36:09 -07:00
|
|
|
#include <linux/memblock.h>
|
2013-09-07 12:05:10 -07:00
|
|
|
#include <linux/of_fdt.h>
|
2009-03-27 06:25:12 -07:00
|
|
|
|
|
|
|
void __init early_init_devtree(void *params)
|
|
|
|
{
|
|
|
|
pr_debug(" -> early_init_devtree(%p)\n", params);
|
|
|
|
|
2013-08-26 08:19:07 -07:00
|
|
|
early_init_dt_scan(params);
|
|
|
|
if (!strlen(boot_command_line))
|
|
|
|
strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
|
2009-03-27 06:25:12 -07:00
|
|
|
|
2011-12-08 11:22:08 -07:00
|
|
|
memblock_allow_resize();
|
2009-03-27 06:25:12 -07:00
|
|
|
|
2010-07-11 21:36:09 -07:00
|
|
|
pr_debug("Phys. mem: %lx\n", (unsigned long) memblock_phys_mem_size());
|
2009-03-27 06:25:12 -07:00
|
|
|
|
|
|
|
pr_debug(" <- early_init_devtree()\n");
|
|
|
|
}
|