drivers: imx: sdma: Cleanup sdma_set_event

Do not touch overrides values in sdma_set_event as they are properly
set at config time.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit is contained in:
Daniel Baluta 2020-10-26 16:00:15 +02:00 committed by Liam Girdwood
parent 39ff32336c
commit 04d14eeaca
1 changed files with 3 additions and 9 deletions

View File

@ -467,21 +467,12 @@ static void sdma_set_event(struct dma_chan_data *channel, int eventnum)
if (eventnum < -1 || eventnum > SDMA_HWEVENTS_COUNT)
return; /* No change if request is invalid */
sdma_clear_event(channel);
if (eventnum == -1) {
sdma_set_overrides(channel, true, false);
return;
}
tr_dbg(&sdma_tr, "sdma_set_event(%d, %d)", channel->index, eventnum);
dma_reg_update_bits(channel->dma, SDMA_CHNENBL(eventnum),
BIT(channel->index), BIT(channel->index));
pdata->hw_event = eventnum;
/* Set correct overrides for event-driven channels:
* EVTOVR=0 HOSTOVR=1
*/
sdma_set_overrides(channel, false, true);
}
static void sdma_channel_put(struct dma_chan_data *channel)
@ -830,6 +821,9 @@ static int sdma_set_config(struct dma_chan_data *channel,
if (ret < 0)
return ret;
/* allow events + allow manual start */
sdma_set_overrides(channel, false, false);
/* Upload context */
ret = sdma_upload_context(channel);
if (ret < 0) {