]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: of: add initialization code for dma reserved memory
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 26 Aug 2013 12:43:10 +0000 (14:43 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 27 Aug 2013 08:53:44 +0000 (10:53 +0200)
commit0c042d5f6d1599f7d4edf38274c79a95255d89a6
treefd26c89bad9e8bdde9af51b47f5bb476e87a1b52
parentc1f2cabda2c6de1efd46d538821d6d4d4605a0d8
drivers: of: add initialization code for dma reserved memory

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>
Documentation/devicetree/bindings/memory.txt [new file with mode: 0644]
drivers/of/Kconfig
drivers/of/Makefile
drivers/of/of_reserved_mem.c [new file with mode: 0644]
drivers/of/platform.c
include/linux/of_reserved_mem.h [new file with mode: 0644]