diff options
author | Thomas Abraham <thomas.abraham@linaro.org> | 2011-10-24 11:43:38 +0200 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-12-23 10:07:05 +0900 |
commit | 4972a80e16a206149729be887285f4494b6826dc (patch) | |
tree | 4d3e703f4337389c409098eceb767e3f44c31b87 /arch/arm/plat-samsung/dma-ops.c | |
parent | 93ed55441245a39e3935f5cf1af3e22febcce905 (diff) |
ARM: SAMSUNG: Add device tree support for pl330 dma engine wrappers
A new dma request id 'DMACH_DT_PROP' is introduced for client drivers
requesting a dma channel. This request indicates that a device tree
node property represting the dma channel is available in
'struct samsung_dma_info'. The dma channel request wrapper uses the
node property value as the value for the filter parameter.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung/dma-ops.c')
-rw-r--r-- | arch/arm/plat-samsung/dma-ops.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/plat-samsung/dma-ops.c b/arch/arm/plat-samsung/dma-ops.c index 889c2c22325..2cded872f22 100644 --- a/arch/arm/plat-samsung/dma-ops.c +++ b/arch/arm/plat-samsung/dma-ops.c @@ -24,11 +24,18 @@ static unsigned samsung_dmadev_request(enum dma_ch dma_ch, struct dma_chan *chan; dma_cap_mask_t mask; struct dma_slave_config slave_config; + void *filter_param; dma_cap_zero(mask); dma_cap_set(info->cap, mask); - chan = dma_request_channel(mask, pl330_filter, (void *)dma_ch); + /* + * If a dma channel property of a device node from device tree is + * specified, use that as the fliter parameter. + */ + filter_param = (dma_ch == DMACH_DT_PROP) ? (void *)info->dt_dmach_prop : + (void *)dma_ch; + chan = dma_request_channel(mask, pl330_filter, filter_param); if (info->direction == DMA_FROM_DEVICE) { memset(&slave_config, 0, sizeof(struct dma_slave_config)); |