aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisael Lopez Cruz2013-06-16 17:15:09 -0500
committerMisael Lopez Cruz2013-07-22 15:04:24 -0500
commite1fd934c1705a00390d9815864d8ea75c8b6be89 (patch)
tree4d769b2a36acd0e1b07a46a3ff8e42c10b7b17e4
parentc708bc749fd3c2666ead16f7942bf5dcdd8bb5bd (diff)
downloadkernel-video-e1fd934c1705a00390d9815864d8ea75c8b6be89.tar.gz
kernel-video-e1fd934c1705a00390d9815864d8ea75c8b6be89.tar.xz
kernel-video-e1fd934c1705a00390d9815864d8ea75c8b6be89.zip
ASoC: DRA7: dra7-evm: HACK: Set McASP DMA reqs in sDMA crossbar
McASP3 and McASP6 don't have default DMA reqs assigned in sDMA crossbar. In the meantime, McASP3 TX/RX DMA reqs are reassigned to sDMA_78 and 79, and McASP6 TX/RX to sDMA_62 and 63. Change-Id: I079e181cfeccd12a121ea3f864bd8905609d09ad Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c16
-rw-r--r--sound/soc/omap/dra7-evm.c15
2 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index eb9824c8a6d..93b875c8106 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1544,12 +1544,20 @@ static struct omap_hwmod dra7xx_mcasp2_hwmod = {
1544 }, 1544 },
1545}; 1545};
1546 1546
1547/* HACK: Taken from UART6 since they're not used in dra7-evm */
1548static struct omap_hwmod_dma_info dra7xx_mcasp3_sdma_reqs[] = {
1549 { .name = "tx", .dma_req = 78 + DRA7XX_DMA_REQ_START },
1550 { .name = "rx", .dma_req = 79 + DRA7XX_DMA_REQ_START },
1551 { .dma_req = -1 }
1552};
1553
1547/* mcasp3 */ 1554/* mcasp3 */
1548static struct omap_hwmod dra7xx_mcasp3_hwmod = { 1555static struct omap_hwmod dra7xx_mcasp3_hwmod = {
1549 .name = "mcasp3", 1556 .name = "mcasp3",
1550 .class = &dra7xx_mcasp_hwmod_class, 1557 .class = &dra7xx_mcasp_hwmod_class,
1551 .clkdm_name = "l4per2_clkdm", 1558 .clkdm_name = "l4per2_clkdm",
1552 .main_clk = "mcasp3_ahclkx_mux", 1559 .main_clk = "mcasp3_ahclkx_mux",
1560 .sdma_reqs = dra7xx_mcasp3_sdma_reqs,
1553 .flags = HWMOD_SWSUP_SIDLE, 1561 .flags = HWMOD_SWSUP_SIDLE,
1554 .prcm = { 1562 .prcm = {
1555 .omap4 = { 1563 .omap4 = {
@@ -1592,12 +1600,20 @@ static struct omap_hwmod dra7xx_mcasp5_hwmod = {
1592 }, 1600 },
1593}; 1601};
1594 1602
1603/* HACK: Taken from UART5 since they're not used in dra7-evm */
1604static struct omap_hwmod_dma_info dra7xx_mcasp6_sdma_reqs[] = {
1605 { .name = "tx", .dma_req = 62 + DRA7XX_DMA_REQ_START },
1606 { .name = "rx", .dma_req = 63 + DRA7XX_DMA_REQ_START },
1607 { .dma_req = -1 }
1608};
1609
1595/* mcasp6 */ 1610/* mcasp6 */
1596static struct omap_hwmod dra7xx_mcasp6_hwmod = { 1611static struct omap_hwmod dra7xx_mcasp6_hwmod = {
1597 .name = "mcasp6", 1612 .name = "mcasp6",
1598 .class = &dra7xx_mcasp_hwmod_class, 1613 .class = &dra7xx_mcasp_hwmod_class,
1599 .clkdm_name = "l4per2_clkdm", 1614 .clkdm_name = "l4per2_clkdm",
1600 .main_clk = "mcasp6_ahclkx_mux", 1615 .main_clk = "mcasp6_ahclkx_mux",
1616 .sdma_reqs = dra7xx_mcasp6_sdma_reqs,
1601 .flags = HWMOD_SWSUP_SIDLE, 1617 .flags = HWMOD_SWSUP_SIDLE,
1602 .prcm = { 1618 .prcm = {
1603 .omap4 = { 1619 .omap4 = {
diff --git a/sound/soc/omap/dra7-evm.c b/sound/soc/omap/dra7-evm.c
index 7dfd431c308..adad937f843 100644
--- a/sound/soc/omap/dra7-evm.c
+++ b/sound/soc/omap/dra7-evm.c
@@ -23,6 +23,7 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/of.h> 24#include <linux/of.h>
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/io.h>
26#include <sound/core.h> 27#include <sound/core.h>
27#include <sound/pcm.h> 28#include <sound/pcm.h>
28#include <sound/soc.h> 29#include <sound/soc.h>
@@ -229,6 +230,20 @@ static int dra7_snd_probe(struct platform_device *pdev)
229 struct dra7_snd_data *card_data; 230 struct dra7_snd_data *card_data;
230 int ret; 231 int ret;
231 232
233 /*
234 * HACK: DMA CROSSBAR
235 * CTRL_CORE_DMA_SYSTEM_DREQ_62_63
236 * McASP6 TX: DREQ_139 -> sDMA_62
237 * McASP6 RX: DREQ_138 -> sDMA_63
238 * CTRL_CORE_DMA_SYSTEM_DREQ_78_79
239 * McASP3 TX: DREQ_133 -> sDMA_78
240 * McASP3 RX: DREQ_132 -> sDMA_79
241 */
242 void __iomem *dma_sys_dreq = ioremap(0x4A002B78, SZ_1K);
243 __raw_writel(0x008a008b, dma_sys_dreq + 0x7c); /* DREQ_62_63 */
244 __raw_writel(0x00840085, dma_sys_dreq + 0x9c); /* DREQ_78_79 */
245 iounmap(dma_sys_dreq);
246
232 card->dev = &pdev->dev; 247 card->dev = &pdev->dev;
233 248
234 card_data = devm_kzalloc(&pdev->dev, sizeof(*card_data), GFP_KERNEL); 249 card_data = devm_kzalloc(&pdev->dev, sizeof(*card_data), GFP_KERNEL);