Skip to content
Browse files

ASoC/dts: OMAP2+: AM33xx: [HACK] Add missing dma info

This patch adds dma related  dt entries and functions that later will be
replaced by actual DMA porting

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
  • Loading branch information...
1 parent ef6f480 commit 75a882b697827fa828f21b1293301ef61eee14e8 @ghebbar ghebbar committed Aug 10, 2012
Showing with 27 additions and 2 deletions.
  1. +3 −0 arch/arm/boot/dts/am33xx.dtsi
  2. +24 −2 sound/soc/davinci/davinci-mcasp.c
View
3 arch/arm/boot/dts/am33xx.dtsi
@@ -171,6 +171,9 @@
ti,hwmods = "mcasp1";
reg = <0x4803C000 0x2000>;
interrupts = <82 83>;
+ asp-chan-q = <2>; /* EVENTQ_2 */
+ tx-dma-offset = <0x46400000>;
+ rx-dma-offset = <0x46400000>;
};
};
};
View
26 sound/soc/davinci/davinci-mcasp.c
@@ -990,6 +990,22 @@ static struct snd_platform_data *davinci_mcasp_set_pdata_from_of(
pdata->serial_dir = of_serial_dir;
}
+ ret = of_property_read_u32(np, "asp-chan-q", &pdata->asp_chan_q);
+ if (ret < 0)
+ goto nodata;
+
+ ret = of_property_read_u32(np, "ram-chan-q", &val);
+ if (ret >= 0)
+ pdata->ram_chan_q = val;
+
+ ret = of_property_read_u32(np, "tx-dma-offset", &pdata->tx_dma_offset);
+ if (ret < 0)
+ goto nodata;
+
+ ret = of_property_read_u32(np, "rx-dma-offset", &pdata->rx_dma_offset);
+ if (ret < 0)
+ goto nodata;
+
ret = of_property_read_u32(np, "tx-num-evt", &val);
if (ret >= 0)
pdata->txnumevt = val;
@@ -1082,7 +1098,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
dma_data->asp_chan_q = pdata->asp_chan_q;
dma_data->ram_chan_q = pdata->ram_chan_q;
dma_data->sram_size = pdata->sram_size_playback;
- dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset +
+ if (dev->version == MCASP_VERSION_3)
+ dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset);
+ else
+ dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset +
mem->start);
/* first TX, then RX */
@@ -1099,7 +1118,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
dma_data->asp_chan_q = pdata->asp_chan_q;
dma_data->ram_chan_q = pdata->ram_chan_q;
dma_data->sram_size = pdata->sram_size_capture;
- dma_data->dma_addr = (dma_addr_t)(pdata->rx_dma_offset +
+ if (dev->version == MCASP_VERSION_3)
+ dma_data->dma_addr = (dma_addr_t) (pdata->rx_dma_offset);
+ else
+ dma_data->dma_addr = (dma_addr_t)(pdata->rx_dma_offset +
mem->start);
res = platform_get_resource(pdev, IORESOURCE_DMA, 1);

0 comments on commit 75a882b

Please sign in to comment.
Something went wrong with that request. Please try again.