prom.c 1012 B

1234567891011121314151617181920212223242526272829303132333435
  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. #include <linux/kernel.h>
  16. #include <linux/string.h>
  17. #include <linux/memblock.h>
  18. #include <linux/of_fdt.h>
  19. void __init early_init_devtree(void *params)
  20. {
  21. pr_debug(" -> early_init_devtree(%p)\n", params);
  22. early_init_dt_scan(params);
  23. if (!strlen(boot_command_line))
  24. strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
  25. memblock_allow_resize();
  26. pr_debug("Phys. mem: %lx\n", (unsigned long) memblock_phys_mem_size());
  27. pr_debug(" <- early_init_devtree()\n");
  28. }