Skip to content

Commit

Permalink
Merge pull request linux4kix#5 from linux4kix/linux-linaro-lsk-v3.14-mx6
Browse files Browse the repository at this point in the history
ASoC: fsl-ssi: Remove useless DMA code
  • Loading branch information
rabeeh committed Sep 9, 2014
2 parents 8856fbf + dd1bd36 commit e85332f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sound/soc/fsl/fsl_ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
int ret = 0;
struct device_attribute *dev_attr = NULL;
struct device_node *np = pdev->dev.of_node;
u32 dmas[4];
const struct of_device_id *of_id;
enum fsl_ssi_type hw_type;
const char *p, *sprop;
Expand Down Expand Up @@ -1478,10 +1479,22 @@ static int fsl_ssi_probe(struct platform_device *pdev)
* We have burstsize be "fifo_depth - 2" to match the SSI
* watermark setting in fsl_ssi_startup().
*/
ssi_private->dma_params_tx.maxburst = ssi_private->fifo_depth - 2;
ssi_private->dma_params_rx.maxburst = ssi_private->fifo_depth - 2;
ssi_private->dma_params_tx.addr =
ssi_private->ssi_phys + offsetof(struct ccsr_ssi, stx0);
ssi_private->dma_params_rx.addr =
ssi_private->ssi_phys + offsetof(struct ccsr_ssi, srx0);

ret = !of_property_read_u32_array(np, "dmas", dmas, 4);
if (ssi_private->use_dma && !ret && dmas[2] == IMX_DMATYPE_SSI_DUAL) {
ssi_private->use_dual_fifo = true;
/* When using dual fifo mode, we need to keep watermark
* as even numbers due to dma script limitation.
*/
ssi_private->dma_params_tx.maxburst &= ~0x1;
ssi_private->dma_params_rx.maxburst &= ~0x1;
}
}

/*
Expand Down

0 comments on commit e85332f

Please sign in to comment.