prom.c (b65b34895437915f411882dd40d704eb0863ffb0) prom.c (95f72d1ed41a66f1c1c29c24d479de81a0bea36f)
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

--- 15 unchanged lines hidden (view full) ---

24#include <linux/stringify.h>
25#include <linux/delay.h>
26#include <linux/initrd.h>
27#include <linux/bitops.h>
28#include <linux/module.h>
29#include <linux/kexec.h>
30#include <linux/debugfs.h>
31#include <linux/irq.h>
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

--- 15 unchanged lines hidden (view full) ---

24#include <linux/stringify.h>
25#include <linux/delay.h>
26#include <linux/initrd.h>
27#include <linux/bitops.h>
28#include <linux/module.h>
29#include <linux/kexec.h>
30#include <linux/debugfs.h>
31#include <linux/irq.h>
32#include <linux/lmb.h>
32#include <linux/memblock.h>
33
34#include <asm/prom.h>
35#include <asm/page.h>
36#include <asm/processor.h>
37#include <asm/irq.h>
38#include <linux/io.h>
39#include <asm/system.h>
40#include <asm/mmu.h>
41#include <asm/pgtable.h>
42#include <asm/sections.h>
43#include <asm/pci-bridge.h>
44
45void __init early_init_dt_scan_chosen_arch(unsigned long node)
46{
47 /* No Microblaze specific code here */
48}
49
50void __init early_init_dt_add_memory_arch(u64 base, u64 size)
51{
33
34#include <asm/prom.h>
35#include <asm/page.h>
36#include <asm/processor.h>
37#include <asm/irq.h>
38#include <linux/io.h>
39#include <asm/system.h>
40#include <asm/mmu.h>
41#include <asm/pgtable.h>
42#include <asm/sections.h>
43#include <asm/pci-bridge.h>
44
45void __init early_init_dt_scan_chosen_arch(unsigned long node)
46{
47 /* No Microblaze specific code here */
48}
49
50void __init early_init_dt_add_memory_arch(u64 base, u64 size)
51{
52 lmb_add(base, size);
52 memblock_add(base, size);
53}
54
55u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
56{
53}
54
55u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
56{
57 return lmb_alloc(size, align);
57 return memblock_alloc(size, align);
58}
59
60#ifdef CONFIG_EARLY_PRINTK
61/* MS this is Microblaze specifig function */
62static int __init early_init_dt_scan_serial(unsigned long node,
63 const char *uname, int depth, void *data)
64{
65 unsigned long l;

--- 33 unchanged lines hidden (view full) ---

99 initial_boot_params = params;
100
101 /* Retrieve various informations from the /chosen node of the
102 * device-tree, including the platform type, initrd location and
103 * size, TCE reserve, and more ...
104 */
105 of_scan_flat_dt(early_init_dt_scan_chosen, NULL);
106
58}
59
60#ifdef CONFIG_EARLY_PRINTK
61/* MS this is Microblaze specifig function */
62static int __init early_init_dt_scan_serial(unsigned long node,
63 const char *uname, int depth, void *data)
64{
65 unsigned long l;

--- 33 unchanged lines hidden (view full) ---

99 initial_boot_params = params;
100
101 /* Retrieve various informations from the /chosen node of the
102 * device-tree, including the platform type, initrd location and
103 * size, TCE reserve, and more ...
104 */
105 of_scan_flat_dt(early_init_dt_scan_chosen, NULL);
106
107 /* Scan memory nodes and rebuild LMBs */
108 lmb_init();
107 /* Scan memory nodes and rebuild MEMBLOCKs */
108 memblock_init();
109 of_scan_flat_dt(early_init_dt_scan_root, NULL);
110 of_scan_flat_dt(early_init_dt_scan_memory, NULL);
111
112 /* Save command line for /proc/cmdline and then parse parameters */
113 strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
114 parse_early_param();
115
109 of_scan_flat_dt(early_init_dt_scan_root, NULL);
110 of_scan_flat_dt(early_init_dt_scan_memory, NULL);
111
112 /* Save command line for /proc/cmdline and then parse parameters */
113 strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
114 parse_early_param();
115
116 lmb_analyze();
116 memblock_analyze();
117
117
118 pr_debug("Phys. mem: %lx\n", (unsigned long) lmb_phys_mem_size());
118 pr_debug("Phys. mem: %lx\n", (unsigned long) memblock_phys_mem_size());
119
120 pr_debug(" <- early_init_devtree()\n");
121}
122
123#ifdef CONFIG_BLK_DEV_INITRD
124void __init early_init_dt_setup_initrd_arch(unsigned long start,
125 unsigned long end)
126{

--- 36 unchanged lines hidden ---
119
120 pr_debug(" <- early_init_devtree()\n");
121}
122
123#ifdef CONFIG_BLK_DEV_INITRD
124void __init early_init_dt_setup_initrd_arch(unsigned long start,
125 unsigned long end)
126{

--- 36 unchanged lines hidden ---