diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-12-28 03:15:53 +0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-12-28 03:15:53 +0400 |
commit | 4eb821999086417ab42a15174b51497122fc406e (patch) | |
tree | 3ef7a628f82286f018df7d9d5f48da475d09c349 /arch/arm/plat-samsung/dma-ops.c | |
parent | 384703b8e6cd4c8ef08512e596024e028c91c339 (diff) | |
parent | 0561ceabd0f13871900d116278fe9268aeb714d1 (diff) | |
download | linux-4eb821999086417ab42a15174b51497122fc406e.tar.xz |
Merge branch 'next-samsung-devel-dt1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into samsung/dt
Diffstat (limited to 'arch/arm/plat-samsung/dma-ops.c')
-rw-r--r-- | arch/arm/plat-samsung/dma-ops.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/plat-samsung/dma-ops.c b/arch/arm/plat-samsung/dma-ops.c index 93a994a5dd8f..2cded872f22b 100644 --- a/arch/arm/plat-samsung/dma-ops.c +++ b/arch/arm/plat-samsung/dma-ops.c @@ -18,23 +18,24 @@ #include <mach/dma.h> -static inline bool pl330_filter(struct dma_chan *chan, void *param) -{ - struct dma_pl330_peri *peri = chan->private; - return peri->peri_id == (unsigned)param; -} - static unsigned samsung_dmadev_request(enum dma_ch dma_ch, struct samsung_dma_info *info) { 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)); |