diff options
Diffstat (limited to 'sound/soc/omap/mcbsp.c')
-rw-r--r-- | sound/soc/omap/mcbsp.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index eb68c7db1cf3..361e4c03646e 100644 --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c | |||
@@ -1012,28 +1012,33 @@ int omap_mcbsp_init(struct platform_device *pdev) | |||
1012 | } | 1012 | } |
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); | 1015 | if (!pdev->dev.of_node) { |
1016 | if (!res) { | 1016 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); |
1017 | dev_err(&pdev->dev, "invalid rx DMA channel\n"); | 1017 | if (!res) { |
1018 | return -ENODEV; | 1018 | dev_err(&pdev->dev, "invalid tx DMA channel\n"); |
1019 | } | 1019 | return -ENODEV; |
1020 | /* RX DMA request number, and port address configuration */ | 1020 | } |
1021 | mcbsp->dma_req[1] = res->start; | 1021 | mcbsp->dma_req[0] = res->start; |
1022 | mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1]; | 1022 | mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0]; |
1023 | mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1); | ||
1024 | mcbsp->dma_data[1].maxburst = 4; | ||
1025 | 1023 | ||
1026 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); | 1024 | res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); |
1027 | if (!res) { | 1025 | if (!res) { |
1028 | dev_err(&pdev->dev, "invalid tx DMA channel\n"); | 1026 | dev_err(&pdev->dev, "invalid rx DMA channel\n"); |
1029 | return -ENODEV; | 1027 | return -ENODEV; |
1028 | } | ||
1029 | mcbsp->dma_req[1] = res->start; | ||
1030 | mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1]; | ||
1031 | } else { | ||
1032 | mcbsp->dma_data[0].filter_data = "tx"; | ||
1033 | mcbsp->dma_data[1].filter_data = "rx"; | ||
1030 | } | 1034 | } |
1031 | /* TX DMA request number, and port address configuration */ | 1035 | |
1032 | mcbsp->dma_req[0] = res->start; | ||
1033 | mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0]; | ||
1034 | mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp, 0); | 1036 | mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp, 0); |
1035 | mcbsp->dma_data[0].maxburst = 4; | 1037 | mcbsp->dma_data[0].maxburst = 4; |
1036 | 1038 | ||
1039 | mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1); | ||
1040 | mcbsp->dma_data[1].maxburst = 4; | ||
1041 | |||
1037 | mcbsp->fclk = clk_get(&pdev->dev, "fck"); | 1042 | mcbsp->fclk = clk_get(&pdev->dev, "fck"); |
1038 | if (IS_ERR(mcbsp->fclk)) { | 1043 | if (IS_ERR(mcbsp->fclk)) { |
1039 | ret = PTR_ERR(mcbsp->fclk); | 1044 | ret = PTR_ERR(mcbsp->fclk); |