drivers: dma-contiguous: clean source code and prepare for device tree
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 29 Jul 2013 12:31:45 +0000 (14:31 +0200)
committerAlex Shi <alex.shi@linaro.org>
Mon, 28 Apr 2014 05:59:00 +0000 (13:59 +0800)
commit5c80c2f3865c7de03842308f08907c16b83fddee
tree23d7765f25213a59f810749bdfc925bc3d8fbcb4
parent76811defa8d3327c2d1755ebcceaa03e9be22bf3
drivers: dma-contiguous: clean source code and prepare for device tree

This patch cleans the initialization of dma contiguous framework. The
all-in-one dma_declare_contiguous() function is now separated into
dma_contiguous_reserve_area() which only steals the the memory from
memblock allocator and dma_contiguous_add_device() function, which
assigns given device to the specified reserved memory area. This improves
the flexibility in defining contiguous memory areas and assigning device
to them, because now it is possible to assign more than one device to
the given contiguous memory area. Such split in initialization procedure
is also required for upcoming device tree support.

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>
(cherry picked from commit a2547380393ac82c659b40182b0da8d05a8365f3)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm/include/asm/dma-contiguous.h
arch/x86/include/asm/dma-contiguous.h
drivers/base/dma-contiguous.c
include/asm-generic/dma-contiguous.h [deleted file]
include/linux/device.h
include/linux/dma-contiguous.h