2009-03-27 21:25:12 +08: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
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version
|
|
|
|
* 2 of the License, or (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/string.h>
|
2010-07-12 12:36:09 +08:00
|
|
|
#include <linux/memblock.h>
|
2013-09-08 03:05:10 +08:00
|
|
|
#include <linux/of_fdt.h>
|
2009-03-27 21:25:12 +08:00
|
|
|
|
|
|
|
void __init early_init_devtree(void *params)
|
|
|
|
{
|
|
|
|
pr_debug(" -> early_init_devtree(%p)\n", params);
|
|
|
|
|
2013-08-26 23:19:07 +08:00
|
|
|
early_init_dt_scan(params);
|
|
|
|
if (!strlen(boot_command_line))
|
|
|
|
strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
|
2009-03-27 21:25:12 +08:00
|
|
|
|
2011-12-09 02:22:08 +08:00
|
|
|
memblock_allow_resize();
|
2009-03-27 21:25:12 +08:00
|
|
|
|
2010-07-12 12:36:09 +08:00
|
|
|
pr_debug("Phys. mem: %lx\n", (unsigned long) memblock_phys_mem_size());
|
2009-03-27 21:25:12 +08:00
|
|
|
|
|
|
|
pr_debug(" <- early_init_devtree()\n");
|
|
|
|
}
|