Skip to content

Commit 3b5a03a

Browse files
mripardVinod Koul
authored and
Vinod Koul
committedDec 22, 2014
dmaengine: cppi41: Split device_control
Split the device_control callback of the TI CPPI41 DMA driver to make use of the newly introduced callbacks, that will eventually be used to retrieve slave capabilities. Signed-off-by: Maxime Ripard <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
1 parent 6782af1 commit 3b5a03a

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed
 

‎drivers/dma/cppi41.c

+1-29
Original file line numberDiff line numberDiff line change
@@ -525,12 +525,6 @@ static struct dma_async_tx_descriptor *cppi41_dma_prep_slave_sg(
525525
return &c->txd;
526526
}
527527

528-
static int cpp41_cfg_chan(struct cppi41_channel *c,
529-
struct dma_slave_config *cfg)
530-
{
531-
return 0;
532-
}
533-
534528
static void cppi41_compute_td_desc(struct cppi41_desc *d)
535529
{
536530
d->pd0 = DESC_TYPE_TEARD << DESC_TYPE;
@@ -647,28 +641,6 @@ static int cppi41_stop_chan(struct dma_chan *chan)
647641
return 0;
648642
}
649643

650-
static int cppi41_dma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
651-
unsigned long arg)
652-
{
653-
struct cppi41_channel *c = to_cpp41_chan(chan);
654-
int ret;
655-
656-
switch (cmd) {
657-
case DMA_SLAVE_CONFIG:
658-
ret = cpp41_cfg_chan(c, (struct dma_slave_config *) arg);
659-
break;
660-
661-
case DMA_TERMINATE_ALL:
662-
ret = cppi41_stop_chan(chan);
663-
break;
664-
665-
default:
666-
ret = -ENXIO;
667-
break;
668-
}
669-
return ret;
670-
}
671-
672644
static void cleanup_chans(struct cppi41_dd *cdd)
673645
{
674646
while (!list_empty(&cdd->ddev.channels)) {
@@ -953,7 +925,7 @@ static int cppi41_dma_probe(struct platform_device *pdev)
953925
cdd->ddev.device_tx_status = cppi41_dma_tx_status;
954926
cdd->ddev.device_issue_pending = cppi41_dma_issue_pending;
955927
cdd->ddev.device_prep_slave_sg = cppi41_dma_prep_slave_sg;
956-
cdd->ddev.device_control = cppi41_dma_control;
928+
cdd->ddev.device_terminate_all = cppi41_stop_chan;
957929
cdd->ddev.dev = dev;
958930
INIT_LIST_HEAD(&cdd->ddev.channels);
959931
cpp41_dma_info.dma_cap = cdd->ddev.cap_mask;

0 commit comments

Comments
 (0)
Please sign in to comment.