Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3257d861 authored by Vinod Koul's avatar Vinod Koul
Browse files

Merge branch 'topic/pl330' into for-linus

parents baab8537 e4975654
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1046,13 +1046,16 @@ static bool _start(struct pl330_thread *thrd)

		if (_state(thrd) == PL330_STATE_KILLING)
			UNTIL(thrd, PL330_STATE_STOPPED)
		/* fall through */

	case PL330_STATE_FAULTING:
		_stop(thrd);
		/* fall through */

	case PL330_STATE_KILLING:
	case PL330_STATE_COMPLETING:
		UNTIL(thrd, PL330_STATE_STOPPED)
		/* fall through */

	case PL330_STATE_STOPPED:
		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)
{
	struct pl330_dmac *pl330;

	if (!thrd || thrd->free)
		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[thrd->lstenq].desc, PL330_ERR_ABORT);

	pl330 = thrd->dmac;

	_free_event(thrd, thrd->ev);
	thrd->free = true;
}
@@ -2257,13 +2256,14 @@ static int pl330_terminate_all(struct dma_chan *chan)

	pm_runtime_get_sync(pl330->ddma.dev);
	spin_lock_irqsave(&pch->lock, flags);

	spin_lock(&pl330->lock);
	_stop(pch->thread);
	spin_unlock(&pl330->lock);

	pch->thread->req[0].desc = NULL;
	pch->thread->req[1].desc = NULL;
	pch->thread->req_running = -1;
	spin_unlock(&pl330->lock);

	power_down = pch->active;
	pch->active = false;