2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 04:03:58 +08:00

Merge branch 'topic/pl330' into for-linus

This commit is contained in:
Vinod Koul 2018-08-17 18:00:29 +05:30
commit 3257d86182

View File

@ -1046,13 +1046,16 @@ static bool _start(struct pl330_thread *thrd)
if (_state(thrd) == PL330_STATE_KILLING) if (_state(thrd) == PL330_STATE_KILLING)
UNTIL(thrd, PL330_STATE_STOPPED) UNTIL(thrd, PL330_STATE_STOPPED)
/* fall through */
case PL330_STATE_FAULTING: case PL330_STATE_FAULTING:
_stop(thrd); _stop(thrd);
/* fall through */
case PL330_STATE_KILLING: case PL330_STATE_KILLING:
case PL330_STATE_COMPLETING: case PL330_STATE_COMPLETING:
UNTIL(thrd, PL330_STATE_STOPPED) UNTIL(thrd, PL330_STATE_STOPPED)
/* fall through */
case PL330_STATE_STOPPED: case PL330_STATE_STOPPED:
return _trigger(thrd); return _trigger(thrd);
@ -1779,8 +1782,6 @@ static inline void _free_event(struct pl330_thread *thrd, int ev)
static void pl330_release_channel(struct pl330_thread *thrd) static void pl330_release_channel(struct pl330_thread *thrd)
{ {
struct pl330_dmac *pl330;
if (!thrd || thrd->free) if (!thrd || thrd->free)
return; return;
@ -1789,8 +1790,6 @@ static void pl330_release_channel(struct pl330_thread *thrd)
dma_pl330_rqcb(thrd->req[1 - thrd->lstenq].desc, PL330_ERR_ABORT); dma_pl330_rqcb(thrd->req[1 - thrd->lstenq].desc, PL330_ERR_ABORT);
dma_pl330_rqcb(thrd->req[thrd->lstenq].desc, PL330_ERR_ABORT); dma_pl330_rqcb(thrd->req[thrd->lstenq].desc, PL330_ERR_ABORT);
pl330 = thrd->dmac;
_free_event(thrd, thrd->ev); _free_event(thrd, thrd->ev);
thrd->free = true; thrd->free = true;
} }
@ -2257,13 +2256,14 @@ static int pl330_terminate_all(struct dma_chan *chan)
pm_runtime_get_sync(pl330->ddma.dev); pm_runtime_get_sync(pl330->ddma.dev);
spin_lock_irqsave(&pch->lock, flags); spin_lock_irqsave(&pch->lock, flags);
spin_lock(&pl330->lock); spin_lock(&pl330->lock);
_stop(pch->thread); _stop(pch->thread);
spin_unlock(&pl330->lock);
pch->thread->req[0].desc = NULL; pch->thread->req[0].desc = NULL;
pch->thread->req[1].desc = NULL; pch->thread->req[1].desc = NULL;
pch->thread->req_running = -1; pch->thread->req_running = -1;
spin_unlock(&pl330->lock);
power_down = pch->active; power_down = pch->active;
pch->active = false; pch->active = false;