diff options
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/init.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 18ec4c504abf..ca907f805c57 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -76,14 +76,6 @@ static int __init parse_tag_initrd2(const struct tag *tag) | |||
76 | 76 | ||
77 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); | 77 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); |
78 | 78 | ||
79 | #ifdef CONFIG_OF_FLATTREE | ||
80 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
81 | { | ||
82 | phys_initrd_start = start; | ||
83 | phys_initrd_size = end - start; | ||
84 | } | ||
85 | #endif /* CONFIG_OF_FLATTREE */ | ||
86 | |||
87 | /* | 79 | /* |
88 | * This keeps memory configuration data used by a couple memory | 80 | * This keeps memory configuration data used by a couple memory |
89 | * initialization functions, as well as show_mem() for the skipping | 81 | * initialization functions, as well as show_mem() for the skipping |
@@ -350,6 +342,11 @@ void __init arm_memblock_init(struct meminfo *mi, | |||
350 | memblock_reserve(__pa(_stext), _end - _stext); | 342 | memblock_reserve(__pa(_stext), _end - _stext); |
351 | #endif | 343 | #endif |
352 | #ifdef CONFIG_BLK_DEV_INITRD | 344 | #ifdef CONFIG_BLK_DEV_INITRD |
345 | /* FDT scan will populate initrd_start */ | ||
346 | if (initrd_start) { | ||
347 | phys_initrd_start = __virt_to_phys(initrd_start); | ||
348 | phys_initrd_size = initrd_end - initrd_start; | ||
349 | } | ||
353 | if (phys_initrd_size && | 350 | if (phys_initrd_size && |
354 | !memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) { | 351 | !memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) { |
355 | pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n", | 352 | pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n", |