diff options
author | Vinod Koul <vkoul@kernel.org> | 2018-08-17 08:30:29 -0400 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-08-17 08:30:29 -0400 |
commit | 3257d86182cc27eda83d6854787256641f7c574b (patch) | |
tree | 185c8d8dfe8c99f65d0352ebcca229a3d03b19a8 | |
parent | baab8537a12b108d7a37c0618f3438117aecb09b (diff) | |
parent | e49756544a21f5625b379b3871d27d8500764670 (diff) |
Merge branch 'topic/pl330' into for-linus
-rw-r--r-- | drivers/dma/pl330.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index defcdde4d358..9e38947f6ffe 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -1046,13 +1046,16 @@ static bool _start(struct pl330_thread *thrd) | |||
1046 | 1046 | ||
1047 | if (_state(thrd) == PL330_STATE_KILLING) | 1047 | if (_state(thrd) == PL330_STATE_KILLING) |
1048 | UNTIL(thrd, PL330_STATE_STOPPED) | 1048 | UNTIL(thrd, PL330_STATE_STOPPED) |
1049 | /* fall through */ | ||
1049 | 1050 | ||
1050 | case PL330_STATE_FAULTING: | 1051 | case PL330_STATE_FAULTING: |
1051 | _stop(thrd); | 1052 | _stop(thrd); |
1053 | /* fall through */ | ||
1052 | 1054 | ||
1053 | case PL330_STATE_KILLING: | 1055 | case PL330_STATE_KILLING: |
1054 | case PL330_STATE_COMPLETING: | 1056 | case PL330_STATE_COMPLETING: |
1055 | UNTIL(thrd, PL330_STATE_STOPPED) | 1057 | UNTIL(thrd, PL330_STATE_STOPPED) |
1058 | /* fall through */ | ||
1056 | 1059 | ||
1057 | case PL330_STATE_STOPPED: | 1060 | case PL330_STATE_STOPPED: |
1058 | return _trigger(thrd); | 1061 | return _trigger(thrd); |
@@ -1779,8 +1782,6 @@ static inline void _free_event(struct pl330_thread *thrd, int ev) | |||
1779 | 1782 | ||
1780 | static void pl330_release_channel(struct pl330_thread *thrd) | 1783 | static void pl330_release_channel(struct pl330_thread *thrd) |
1781 | { | 1784 | { |
1782 | struct pl330_dmac *pl330; | ||
1783 | |||
1784 | if (!thrd || thrd->free) | 1785 | if (!thrd || thrd->free) |
1785 | return; | 1786 | return; |
1786 | 1787 | ||
@@ -1789,8 +1790,6 @@ static void pl330_release_channel(struct pl330_thread *thrd) | |||
1789 | dma_pl330_rqcb(thrd->req[1 - thrd->lstenq].desc, PL330_ERR_ABORT); | 1790 | dma_pl330_rqcb(thrd->req[1 - thrd->lstenq].desc, PL330_ERR_ABORT); |
1790 | dma_pl330_rqcb(thrd->req[thrd->lstenq].desc, PL330_ERR_ABORT); | 1791 | dma_pl330_rqcb(thrd->req[thrd->lstenq].desc, PL330_ERR_ABORT); |
1791 | 1792 | ||
1792 | pl330 = thrd->dmac; | ||
1793 | |||
1794 | _free_event(thrd, thrd->ev); | 1793 | _free_event(thrd, thrd->ev); |
1795 | thrd->free = true; | 1794 | thrd->free = true; |
1796 | } | 1795 | } |
@@ -2257,13 +2256,14 @@ static int pl330_terminate_all(struct dma_chan *chan) | |||
2257 | 2256 | ||
2258 | pm_runtime_get_sync(pl330->ddma.dev); | 2257 | pm_runtime_get_sync(pl330->ddma.dev); |
2259 | spin_lock_irqsave(&pch->lock, flags); | 2258 | spin_lock_irqsave(&pch->lock, flags); |
2259 | |||
2260 | spin_lock(&pl330->lock); | 2260 | spin_lock(&pl330->lock); |
2261 | _stop(pch->thread); | 2261 | _stop(pch->thread); |
2262 | spin_unlock(&pl330->lock); | ||
2263 | |||
2264 | pch->thread->req[0].desc = NULL; | 2262 | pch->thread->req[0].desc = NULL; |
2265 | pch->thread->req[1].desc = NULL; | 2263 | pch->thread->req[1].desc = NULL; |
2266 | pch->thread->req_running = -1; | 2264 | pch->thread->req_running = -1; |
2265 | spin_unlock(&pl330->lock); | ||
2266 | |||
2267 | power_down = pch->active; | 2267 | power_down = pch->active; |
2268 | pch->active = false; | 2268 | pch->active = false; |
2269 | 2269 | ||