aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_ssi.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-12 08:57:04 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-12 08:57:04 -0400
commit38e8c895d33b0642dc341f83cce0adde4cffbc82 (patch)
tree3657c043986d5c944f971c9685ae4a68f5a5b035 /sound/soc/fsl/fsl_ssi.c
parentd66e065c5b8b64b03a9d9b8a7c5d674c7dfa2e3d (diff)
parent69b6f19622ce0aef41df884b75e3f789c64b89c0 (diff)
Merge remote-tracking branch 'asoc/topic/dma' into asoc-next
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r--sound/soc/fsl/fsl_ssi.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index fe04c67f8fb8..42366d776f62 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -27,6 +27,7 @@
27#include <sound/pcm_params.h> 27#include <sound/pcm_params.h>
28#include <sound/initval.h> 28#include <sound/initval.h>
29#include <sound/soc.h> 29#include <sound/soc.h>
30#include <sound/dmaengine_pcm.h>
30 31
31#include "fsl_ssi.h" 32#include "fsl_ssi.h"
32#include "imx-pcm.h" 33#include "imx-pcm.h"
@@ -122,8 +123,10 @@ struct fsl_ssi_private {
122 bool ssi_on_imx; 123 bool ssi_on_imx;
123 struct clk *clk; 124 struct clk *clk;
124 struct platform_device *imx_pcm_pdev; 125 struct platform_device *imx_pcm_pdev;
125 struct imx_pcm_dma_params dma_params_tx; 126 struct snd_dmaengine_dai_dma_data dma_params_tx;
126 struct imx_pcm_dma_params dma_params_rx; 127 struct snd_dmaengine_dai_dma_data dma_params_rx;
128 struct imx_dma_data filter_data_tx;
129 struct imx_dma_data filter_data_rx;
127 130
128 struct { 131 struct {
129 unsigned int rfrc; 132 unsigned int rfrc;
@@ -653,6 +656,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
653 const uint32_t *iprop; 656 const uint32_t *iprop;
654 struct resource res; 657 struct resource res;
655 char name[64]; 658 char name[64];
659 bool shared;
656 660
657 /* SSIs that are not connected on the board should have a 661 /* SSIs that are not connected on the board should have a
658 * status = "disabled" 662 * status = "disabled"
@@ -741,14 +745,18 @@ static int fsl_ssi_probe(struct platform_device *pdev)
741 * We have burstsize be "fifo_depth - 2" to match the SSI 745 * We have burstsize be "fifo_depth - 2" to match the SSI
742 * watermark setting in fsl_ssi_startup(). 746 * watermark setting in fsl_ssi_startup().
743 */ 747 */
744 ssi_private->dma_params_tx.burstsize = 748 ssi_private->dma_params_tx.maxburst =
745 ssi_private->fifo_depth - 2; 749 ssi_private->fifo_depth - 2;
746 ssi_private->dma_params_rx.burstsize = 750 ssi_private->dma_params_rx.maxburst =
747 ssi_private->fifo_depth - 2; 751 ssi_private->fifo_depth - 2;
748 ssi_private->dma_params_tx.dma_addr = 752 ssi_private->dma_params_tx.addr =
749 ssi_private->ssi_phys + offsetof(struct ccsr_ssi, stx0); 753 ssi_private->ssi_phys + offsetof(struct ccsr_ssi, stx0);
750 ssi_private->dma_params_rx.dma_addr = 754 ssi_private->dma_params_rx.addr =
751 ssi_private->ssi_phys + offsetof(struct ccsr_ssi, srx0); 755 ssi_private->ssi_phys + offsetof(struct ccsr_ssi, srx0);
756 ssi_private->dma_params_tx.filter_data =
757 &ssi_private->filter_data_tx;
758 ssi_private->dma_params_rx.filter_data =
759 &ssi_private->filter_data_rx;
752 /* 760 /*
753 * TODO: This is a temporary solution and should be changed 761 * TODO: This is a temporary solution and should be changed
754 * to use generic DMA binding later when the helplers get in. 762 * to use generic DMA binding later when the helplers get in.
@@ -759,14 +767,14 @@ static int fsl_ssi_probe(struct platform_device *pdev)
759 dev_err(&pdev->dev, "could not get dma events\n"); 767 dev_err(&pdev->dev, "could not get dma events\n");
760 goto error_clk; 768 goto error_clk;
761 } 769 }
762 ssi_private->dma_params_tx.dma = dma_events[0]; 770
763 ssi_private->dma_params_rx.dma = dma_events[1]; 771 shared = of_device_is_compatible(of_get_parent(np),
764 772 "fsl,spba-bus");
765 ssi_private->dma_params_tx.shared_peripheral = 773
766 of_device_is_compatible(of_get_parent(np), 774 imx_pcm_dma_params_init_data(&ssi_private->filter_data_tx,
767 "fsl,spba-bus"); 775 dma_events[0], shared);
768 ssi_private->dma_params_rx.shared_peripheral = 776 imx_pcm_dma_params_init_data(&ssi_private->filter_data_rx,
769 ssi_private->dma_params_tx.shared_peripheral; 777 dma_events[1], shared);
770 } 778 }
771 779
772 /* Initialize the the device_attribute structure */ 780 /* Initialize the the device_attribute structure */