powerpc: introduce early_get_first_memblock_info
authorKevin Hao <haokexin@gmail.com>
Tue, 24 Dec 2013 07:12:08 +0000 (15:12 +0800)
committerScott Wood <scottwood@freescale.com>
Thu, 9 Jan 2014 23:52:17 +0000 (17:52 -0600)
commitb27652dd2174df1a7e0a7c5f00d1c8e3ed9287a7
treea93bf5700c442d52a2ed86de8d2203f05e78cf23
parent78a235efdc42ff363de81fdbc171385e8b86b69b
powerpc: introduce early_get_first_memblock_info

For a relocatable kernel since it can be loaded at any place, there
is no any relation between the kernel start addr and the memstart_addr.
So we can't calculate the memstart_addr from kernel start addr. And
also we can't wait to do the relocation after we get the real
memstart_addr from device tree because it is so late. So introduce
a new function we can use to get the first memblock address and size
in a very early stage (before machine_init).

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/kernel/prom.c
include/linux/of_fdt.h