提交 fe7db757 编写于 作者: F Florian Fainelli 提交者: Rob Herring

of/fdt: Populate phys_initrd_start/phys_initrd_size from FDT

Now that we have central and global variables holding the physical
address and size of the initrd, we can have
early_init_dt_check_for_initrd() populate
phys_initrd_start/phys_initrd_size for us.

This allows us to remove a chunk of code from arch/arm/mm/init.c
introduced with commit 65939301 ("arm: set initrd_start/initrd_end
for fdt scan").
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
Signed-off-by: NRob Herring <robh@kernel.org>
上级 b1ab95c6
......@@ -235,12 +235,6 @@ static void __init arm_initrd_init(void)
phys_addr_t start;
unsigned long size;
/* FDT scan will populate initrd_start */
if (initrd_start && !phys_initrd_size) {
phys_initrd_start = __virt_to_phys(initrd_start);
phys_initrd_size = initrd_end - initrd_start;
}
initrd_start = initrd_end = 0;
if (!phys_initrd_size)
......
......@@ -924,6 +924,8 @@ static void __init early_init_dt_check_for_initrd(unsigned long node)
end = of_read_number(prop, len/4);
__early_init_dt_declare_initrd(start, end);
phys_initrd_start = start;
phys_initrd_size = end - start;
pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n",
(unsigned long long)start, (unsigned long long)end);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册