diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-17 21:40:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-17 21:40:24 -0500 |
commit | 57f2685c16fa8e0cb86e4bc7c8ac33bfed943819 (patch) | |
tree | 96a42fe632687c8486c250c4805bf1d4c9c34d19 /drivers/dma/pl330.c | |
parent | 488a9d018256dc9f29e041c0360445b6d25eea9a (diff) | |
parent | e08b881a69d638175bfa99b5af4d72b731633ea7 (diff) |
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (53 commits)
ARM: mach-shmobile: specify CHCLR registers on SH7372
dma: shdma: fix runtime PM: clear channel buffers on reset
dma/imx-sdma: save irq flags when use spin_lock in sdma_tx_submit
dmaengine/ste_dma40: clear LNK on channel startup
dmaengine: intel_mid_dma: remove legacy pm interface
ASoC: mxs: correct 'direction' of device_prep_dma_cyclic
dmaengine: intel_mid_dma: error path fix
dmaengine: intel_mid_dma: locking and freeing fixes
mtd: gpmi-nand: move to dma_transfer_direction
mtd: fix compile error for gpmi-nand
mmc: mxs-mmc: fix the dma_transfer_direction migration
dmaengine: add DMA_TRANS_NONE to dma_transfer_direction
dma: mxs-dma: Don't use CLKGATE bits in CTRL0 to disable DMA channels
dma: mxs-dma: make mxs_dma_prep_slave_sg() multi user safe
dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled.
dma: mxs-dma: fix a typo in comment
DMA: PL330: Remove pm_runtime_xxx calls from pl330 probe/remove
video i.MX IPU: Fix display connections
i.MX IPU DMA: Fix wrong burstsize settings
dmaengine/ste_dma40: allow fixed physical channel
...
Fix up conflicts in drivers/dma/{Kconfig,mxs-dma.c,pl330.c}
The conflicts looked pretty trivial, but I'll ask people to verify them.
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r-- | drivers/dma/pl330.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 09adcfcd953e..b8ec03ee8e22 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -350,14 +350,14 @@ static int pl330_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, unsigned | |||
350 | case DMA_SLAVE_CONFIG: | 350 | case DMA_SLAVE_CONFIG: |
351 | slave_config = (struct dma_slave_config *)arg; | 351 | slave_config = (struct dma_slave_config *)arg; |
352 | 352 | ||
353 | if (slave_config->direction == DMA_TO_DEVICE) { | 353 | if (slave_config->direction == DMA_MEM_TO_DEV) { |
354 | if (slave_config->dst_addr) | 354 | if (slave_config->dst_addr) |
355 | pch->fifo_addr = slave_config->dst_addr; | 355 | pch->fifo_addr = slave_config->dst_addr; |
356 | if (slave_config->dst_addr_width) | 356 | if (slave_config->dst_addr_width) |
357 | pch->burst_sz = __ffs(slave_config->dst_addr_width); | 357 | pch->burst_sz = __ffs(slave_config->dst_addr_width); |
358 | if (slave_config->dst_maxburst) | 358 | if (slave_config->dst_maxburst) |
359 | pch->burst_len = slave_config->dst_maxburst; | 359 | pch->burst_len = slave_config->dst_maxburst; |
360 | } else if (slave_config->direction == DMA_FROM_DEVICE) { | 360 | } else if (slave_config->direction == DMA_DEV_TO_MEM) { |
361 | if (slave_config->src_addr) | 361 | if (slave_config->src_addr) |
362 | pch->fifo_addr = slave_config->src_addr; | 362 | pch->fifo_addr = slave_config->src_addr; |
363 | if (slave_config->src_addr_width) | 363 | if (slave_config->src_addr_width) |
@@ -621,7 +621,7 @@ static inline int get_burst_len(struct dma_pl330_desc *desc, size_t len) | |||
621 | 621 | ||
622 | static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic( | 622 | static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic( |
623 | struct dma_chan *chan, dma_addr_t dma_addr, size_t len, | 623 | struct dma_chan *chan, dma_addr_t dma_addr, size_t len, |
624 | size_t period_len, enum dma_data_direction direction) | 624 | size_t period_len, enum dma_transfer_direction direction) |
625 | { | 625 | { |
626 | struct dma_pl330_desc *desc; | 626 | struct dma_pl330_desc *desc; |
627 | struct dma_pl330_chan *pch = to_pchan(chan); | 627 | struct dma_pl330_chan *pch = to_pchan(chan); |
@@ -636,14 +636,14 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic( | |||
636 | } | 636 | } |
637 | 637 | ||
638 | switch (direction) { | 638 | switch (direction) { |
639 | case DMA_TO_DEVICE: | 639 | case DMA_MEM_TO_DEV: |
640 | desc->rqcfg.src_inc = 1; | 640 | desc->rqcfg.src_inc = 1; |
641 | desc->rqcfg.dst_inc = 0; | 641 | desc->rqcfg.dst_inc = 0; |
642 | desc->req.rqtype = MEMTODEV; | 642 | desc->req.rqtype = MEMTODEV; |
643 | src = dma_addr; | 643 | src = dma_addr; |
644 | dst = pch->fifo_addr; | 644 | dst = pch->fifo_addr; |
645 | break; | 645 | break; |
646 | case DMA_FROM_DEVICE: | 646 | case DMA_DEV_TO_MEM: |
647 | desc->rqcfg.src_inc = 0; | 647 | desc->rqcfg.src_inc = 0; |
648 | desc->rqcfg.dst_inc = 1; | 648 | desc->rqcfg.dst_inc = 1; |
649 | desc->req.rqtype = DEVTOMEM; | 649 | desc->req.rqtype = DEVTOMEM; |
@@ -710,7 +710,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst, | |||
710 | 710 | ||
711 | static struct dma_async_tx_descriptor * | 711 | static struct dma_async_tx_descriptor * |
712 | pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | 712 | pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, |
713 | unsigned int sg_len, enum dma_data_direction direction, | 713 | unsigned int sg_len, enum dma_transfer_direction direction, |
714 | unsigned long flg) | 714 | unsigned long flg) |
715 | { | 715 | { |
716 | struct dma_pl330_desc *first, *desc = NULL; | 716 | struct dma_pl330_desc *first, *desc = NULL; |
@@ -759,7 +759,7 @@ pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
759 | else | 759 | else |
760 | list_add_tail(&desc->node, &first->node); | 760 | list_add_tail(&desc->node, &first->node); |
761 | 761 | ||
762 | if (direction == DMA_TO_DEVICE) { | 762 | if (direction == DMA_MEM_TO_DEV) { |
763 | desc->rqcfg.src_inc = 1; | 763 | desc->rqcfg.src_inc = 1; |
764 | desc->rqcfg.dst_inc = 0; | 764 | desc->rqcfg.dst_inc = 0; |
765 | desc->req.rqtype = MEMTODEV; | 765 | desc->req.rqtype = MEMTODEV; |
@@ -834,17 +834,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) | |||
834 | 834 | ||
835 | amba_set_drvdata(adev, pdmac); | 835 | amba_set_drvdata(adev, pdmac); |
836 | 836 | ||
837 | #ifdef CONFIG_PM_RUNTIME | 837 | #ifndef CONFIG_PM_RUNTIME |
838 | /* to use the runtime PM helper functions */ | ||
839 | pm_runtime_enable(&adev->dev); | ||
840 | |||
841 | /* enable the power domain */ | ||
842 | if (pm_runtime_get_sync(&adev->dev)) { | ||
843 | dev_err(&adev->dev, "failed to get runtime pm\n"); | ||
844 | ret = -ENODEV; | ||
845 | goto probe_err1; | ||
846 | } | ||
847 | #else | ||
848 | /* enable dma clk */ | 838 | /* enable dma clk */ |
849 | clk_enable(pdmac->clk); | 839 | clk_enable(pdmac->clk); |
850 | #endif | 840 | #endif |
@@ -977,10 +967,7 @@ static int __devexit pl330_remove(struct amba_device *adev) | |||
977 | res = &adev->res; | 967 | res = &adev->res; |
978 | release_mem_region(res->start, resource_size(res)); | 968 | release_mem_region(res->start, resource_size(res)); |
979 | 969 | ||
980 | #ifdef CONFIG_PM_RUNTIME | 970 | #ifndef CONFIG_PM_RUNTIME |
981 | pm_runtime_put(&adev->dev); | ||
982 | pm_runtime_disable(&adev->dev); | ||
983 | #else | ||
984 | clk_disable(pdmac->clk); | 971 | clk_disable(pdmac->clk); |
985 | #endif | 972 | #endif |
986 | 973 | ||