.. | .. |
---|
13 | 13 | #include <linux/sched.h> |
---|
14 | 14 | #include <linux/delay.h> |
---|
15 | 15 | #include <linux/interrupt.h> |
---|
| 16 | +#include <linux/io.h> |
---|
16 | 17 | #include <linux/mm.h> |
---|
17 | 18 | #include <linux/fs.h> |
---|
18 | 19 | #include <linux/console.h> |
---|
19 | 20 | #include <linux/errno.h> |
---|
20 | 21 | #include <linux/string.h> |
---|
21 | | -#include <linux/bootmem.h> |
---|
22 | 22 | #include <linux/seq_file.h> |
---|
23 | 23 | #include <linux/init.h> |
---|
24 | 24 | #include <linux/of.h> |
---|
.. | .. |
---|
31 | 31 | |
---|
32 | 32 | #include <asm/setup.h> |
---|
33 | 33 | #include <asm/irq.h> |
---|
34 | | -#include <asm/pgtable.h> |
---|
35 | 34 | #include <asm/sections.h> |
---|
36 | 35 | #include <asm/page.h> |
---|
37 | 36 | |
---|
.. | .. |
---|
75 | 74 | memory_end = memory_start = 0; |
---|
76 | 75 | |
---|
77 | 76 | /* Find main memory where is the kernel */ |
---|
78 | | - for_each_memblock(memory, region) { |
---|
79 | | - memory_start = region->base; |
---|
80 | | - memory_end = region->base + region->size; |
---|
81 | | - } |
---|
| 77 | + memory_start = memblock_start_of_DRAM(); |
---|
| 78 | + memory_end = memblock_end_of_DRAM(); |
---|
82 | 79 | |
---|
83 | 80 | if (!memory_end) |
---|
84 | 81 | panic("No memory!"); |
---|
85 | 82 | |
---|
86 | 83 | /* setup bootmem globals (we use no_bootmem, but mm still depends on this) */ |
---|
87 | 84 | min_low_pfn = PFN_UP(memory_start); |
---|
88 | | - max_low_pfn = PFN_DOWN(memblock_end_of_DRAM()); |
---|
| 85 | + max_low_pfn = PFN_DOWN(memory_end); |
---|
89 | 86 | max_pfn = max_low_pfn; |
---|
90 | 87 | |
---|
91 | 88 | memblock_reserve(__pa(_stext), _end - _stext); |
---|