summaryrefslogtreecommitdiffstats
path: root/drivers/of/of_reserved_mem.c
AgeCommit message (Collapse)Author
2013-09-10drivers: of: fix build break if asm/dma-contiguous.h is missingMarek Szyprowski
It is not needed to include asm/dma-contiguous.h header to compile reserved memory initialization code, so remove it to avoid build break on architectures without CMA support. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Tested-by: Guenter Roeck <linux@roeck-us.net>
2013-08-27drivers: of: add initialization code for dma reserved memoryMarek Szyprowski
This patch adds device tree support for contiguous and reserved memory regions defined in device tree. Large 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) or mapping with special properties can be created (for CMA blocks). This all happens before device tree structures are unflattened, so we need to get reserved memory layout directly from fdt. Later, those reserved memory regions are assigned to devices on each device structure initialization. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Acked-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Rob Herring <rob.herring@calxeda.com>