drivers: of: add initialization code for static reserved memory
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 28 Feb 2014 13:42:47 +0000 (14:42 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 24 Jul 2014 18:56:48 +0000 (19:56 +0100)
commit73eebf3ecfd418b26f0d3536cbdecb41717dfe31
treebab2712529aabb1231cc704e5cbb8c4b564310f6
parent3e1298883243f952731db48d9642ddb75dc003c8
drivers: of: add initialization code for static reserved memory

This patch adds support for static (defined by 'reg' property) reserved
memory regions declared in device tree.

Memory blocks can be reliably reserved only during early boot. This must
happen before the whole memory management subsystem is initialized,
because we need to ensure that the given contiguous blocks are not yet
allocated by kernel. Also it must happen before kernel mappings for the
whole low memory are created, to ensure that there will be no mappings
(for reserved blocks). Typically, all this happens before device tree
structures are unflattened, so we need to get reserved memory layout
directly from fdt.

Based on previous code provided by Josh Cartwright <joshc@codeaurora.org>

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
(cherry picked from commit e8d9d1f5485b52ec3c4d7af839e6914438f6c285)
Signed-off-by: Mark Brown <broonie@linaro.org>
Conflicts:
drivers/of/fdt.c
include/linux/of_fdt.h
drivers/of/fdt.c
include/linux/of_fdt.h