diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-17 13:54:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-17 13:54:41 -0500 |
commit | e1288cd72f54e7fc16ae9ebb4d0647537ef848d4 (patch) | |
tree | b4fd87b9307d8041fb680cb9b8fbf787ec968df7 /drivers/dma/at_hdmac.c | |
parent | e78bf5e6cbe837daa6ab628a5f679548742994d3 (diff) | |
parent | 94ae85220a07d357d4937086c490854f63344de4 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (63 commits)
ARM: PL08x: cleanup comments
Update CONFIG_MD_RAID6_PQ to CONFIG_RAID6_PQ in drivers/dma/iop-adma.c
ARM: PL08x: fix a warning
Fix dmaengine_submit() return type
dmaengine: at_hdmac: fix race while monitoring channel status
dmaengine: at_hdmac: flags located in first descriptor
dmaengine: at_hdmac: use subsys_initcall instead of module_init
dmaengine: at_hdmac: no need set ACK in new descriptor
dmaengine: at_hdmac: trivial add precision to unmapping comment
dmaengine: at_hdmac: use dma_address to program DMA hardware
pch_dma: support new device ML7213 IOH
ARM: PL08x: prevent dma_set_runtime_config() reconfiguring memcpy channels
ARM: PL08x: allow dma_set_runtime_config() to return errors
ARM: PL08x: fix locking between prepare function and submit function
ARM: PL08x: introduce 'phychan_hold' to hold on to physical channels
ARM: PL08x: put txd's on the pending list in pl08x_tx_submit()
ARM: PL08x: rename 'desc_list' as 'pend_list'
ARM: PL08x: implement unmapping of memcpy buffers
ARM: PL08x: store prep_* flags in async_tx structure
ARM: PL08x: shrink srcbus/dstbus in txd structure
...
Diffstat (limited to 'drivers/dma/at_hdmac.c')
-rw-r--r-- | drivers/dma/at_hdmac.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index ea0ee81cff53..3d7d705f026f 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c | |||
@@ -253,7 +253,7 @@ atc_chain_complete(struct at_dma_chan *atchan, struct at_desc *desc) | |||
253 | /* move myself to free_list */ | 253 | /* move myself to free_list */ |
254 | list_move(&desc->desc_node, &atchan->free_list); | 254 | list_move(&desc->desc_node, &atchan->free_list); |
255 | 255 | ||
256 | /* unmap dma addresses */ | 256 | /* unmap dma addresses (not on slave channels) */ |
257 | if (!atchan->chan_common.private) { | 257 | if (!atchan->chan_common.private) { |
258 | struct device *parent = chan2parent(&atchan->chan_common); | 258 | struct device *parent = chan2parent(&atchan->chan_common); |
259 | if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP)) { | 259 | if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP)) { |
@@ -583,7 +583,6 @@ atc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, | |||
583 | desc->lli.ctrlb = ctrlb; | 583 | desc->lli.ctrlb = ctrlb; |
584 | 584 | ||
585 | desc->txd.cookie = 0; | 585 | desc->txd.cookie = 0; |
586 | async_tx_ack(&desc->txd); | ||
587 | 586 | ||
588 | if (!first) { | 587 | if (!first) { |
589 | first = desc; | 588 | first = desc; |
@@ -604,7 +603,7 @@ atc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, | |||
604 | /* set end-of-link to the last link descriptor of list*/ | 603 | /* set end-of-link to the last link descriptor of list*/ |
605 | set_desc_eol(desc); | 604 | set_desc_eol(desc); |
606 | 605 | ||
607 | desc->txd.flags = flags; /* client is in control of this ack */ | 606 | first->txd.flags = flags; /* client is in control of this ack */ |
608 | 607 | ||
609 | return &first->txd; | 608 | return &first->txd; |
610 | 609 | ||
@@ -670,7 +669,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
670 | if (!desc) | 669 | if (!desc) |
671 | goto err_desc_get; | 670 | goto err_desc_get; |
672 | 671 | ||
673 | mem = sg_phys(sg); | 672 | mem = sg_dma_address(sg); |
674 | len = sg_dma_len(sg); | 673 | len = sg_dma_len(sg); |
675 | mem_width = 2; | 674 | mem_width = 2; |
676 | if (unlikely(mem & 3 || len & 3)) | 675 | if (unlikely(mem & 3 || len & 3)) |
@@ -712,7 +711,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
712 | if (!desc) | 711 | if (!desc) |
713 | goto err_desc_get; | 712 | goto err_desc_get; |
714 | 713 | ||
715 | mem = sg_phys(sg); | 714 | mem = sg_dma_address(sg); |
716 | len = sg_dma_len(sg); | 715 | len = sg_dma_len(sg); |
717 | mem_width = 2; | 716 | mem_width = 2; |
718 | if (unlikely(mem & 3 || len & 3)) | 717 | if (unlikely(mem & 3 || len & 3)) |
@@ -749,8 +748,8 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, | |||
749 | first->txd.cookie = -EBUSY; | 748 | first->txd.cookie = -EBUSY; |
750 | first->len = total_len; | 749 | first->len = total_len; |
751 | 750 | ||
752 | /* last link descriptor of list is responsible of flags */ | 751 | /* first link descriptor of list is responsible of flags */ |
753 | prev->txd.flags = flags; /* client is in control of this ack */ | 752 | first->txd.flags = flags; /* client is in control of this ack */ |
754 | 753 | ||
755 | return &first->txd; | 754 | return &first->txd; |
756 | 755 | ||
@@ -854,11 +853,11 @@ static void atc_issue_pending(struct dma_chan *chan) | |||
854 | 853 | ||
855 | dev_vdbg(chan2dev(chan), "issue_pending\n"); | 854 | dev_vdbg(chan2dev(chan), "issue_pending\n"); |
856 | 855 | ||
856 | spin_lock_bh(&atchan->lock); | ||
857 | if (!atc_chan_is_enabled(atchan)) { | 857 | if (!atc_chan_is_enabled(atchan)) { |
858 | spin_lock_bh(&atchan->lock); | ||
859 | atc_advance_work(atchan); | 858 | atc_advance_work(atchan); |
860 | spin_unlock_bh(&atchan->lock); | ||
861 | } | 859 | } |
860 | spin_unlock_bh(&atchan->lock); | ||
862 | } | 861 | } |
863 | 862 | ||
864 | /** | 863 | /** |
@@ -1210,7 +1209,7 @@ static int __init at_dma_init(void) | |||
1210 | { | 1209 | { |
1211 | return platform_driver_probe(&at_dma_driver, at_dma_probe); | 1210 | return platform_driver_probe(&at_dma_driver, at_dma_probe); |
1212 | } | 1211 | } |
1213 | module_init(at_dma_init); | 1212 | subsys_initcall(at_dma_init); |
1214 | 1213 | ||
1215 | static void __exit at_dma_exit(void) | 1214 | static void __exit at_dma_exit(void) |
1216 | { | 1215 | { |