From e1fd934c1705a00390d9815864d8ea75c8b6be89 Mon Sep 17 00:00:00 2001 From: Misael Lopez Cruz Date: Sun, 16 Jun 2013 17:15:09 -0500 Subject: 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 --- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 16 ++++++++++++++++ sound/soc/omap/dra7-evm.c | 15 +++++++++++++++ 2 files changed, 31 insertions(+) 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 = { }, }; +/* HACK: Taken from UART6 since they're not used in dra7-evm */ +static struct omap_hwmod_dma_info dra7xx_mcasp3_sdma_reqs[] = { + { .name = "tx", .dma_req = 78 + DRA7XX_DMA_REQ_START }, + { .name = "rx", .dma_req = 79 + DRA7XX_DMA_REQ_START }, + { .dma_req = -1 } +}; + /* mcasp3 */ static struct omap_hwmod dra7xx_mcasp3_hwmod = { .name = "mcasp3", .class = &dra7xx_mcasp_hwmod_class, .clkdm_name = "l4per2_clkdm", .main_clk = "mcasp3_ahclkx_mux", + .sdma_reqs = dra7xx_mcasp3_sdma_reqs, .flags = HWMOD_SWSUP_SIDLE, .prcm = { .omap4 = { @@ -1592,12 +1600,20 @@ static struct omap_hwmod dra7xx_mcasp5_hwmod = { }, }; +/* HACK: Taken from UART5 since they're not used in dra7-evm */ +static struct omap_hwmod_dma_info dra7xx_mcasp6_sdma_reqs[] = { + { .name = "tx", .dma_req = 62 + DRA7XX_DMA_REQ_START }, + { .name = "rx", .dma_req = 63 + DRA7XX_DMA_REQ_START }, + { .dma_req = -1 } +}; + /* mcasp6 */ static struct omap_hwmod dra7xx_mcasp6_hwmod = { .name = "mcasp6", .class = &dra7xx_mcasp_hwmod_class, .clkdm_name = "l4per2_clkdm", .main_clk = "mcasp6_ahclkx_mux", + .sdma_reqs = dra7xx_mcasp6_sdma_reqs, .flags = HWMOD_SWSUP_SIDLE, .prcm = { .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 @@ #include #include #include +#include #include #include #include @@ -229,6 +230,20 @@ static int dra7_snd_probe(struct platform_device *pdev) struct dra7_snd_data *card_data; int ret; + /* + * HACK: DMA CROSSBAR + * CTRL_CORE_DMA_SYSTEM_DREQ_62_63 + * McASP6 TX: DREQ_139 -> sDMA_62 + * McASP6 RX: DREQ_138 -> sDMA_63 + * CTRL_CORE_DMA_SYSTEM_DREQ_78_79 + * McASP3 TX: DREQ_133 -> sDMA_78 + * McASP3 RX: DREQ_132 -> sDMA_79 + */ + void __iomem *dma_sys_dreq = ioremap(0x4A002B78, SZ_1K); + __raw_writel(0x008a008b, dma_sys_dreq + 0x7c); /* DREQ_62_63 */ + __raw_writel(0x00840085, dma_sys_dreq + 0x9c); /* DREQ_78_79 */ + iounmap(dma_sys_dreq); + card->dev = &pdev->dev; card_data = devm_kzalloc(&pdev->dev, sizeof(*card_data), GFP_KERNEL); -- cgit v1.2.3-54-g00ecf