Skip to contentSkip to conversation

ASoC: OMAP: Initialize XCCR and RCCR registers in McBSP DAI driver

PATCH In review Jarkko Nikula 2 participants 4 messages Jan 29, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ASoC: OMAP: Initialize XCCR and RCCR registers in McBSP DAI driver

Hi

I'm sending this on behalf of Misael Lopez Cruz with commit id for counterpart patch corrected. This is a fix for 2.6.29.

There are some OMAP3 based boards where bootloader is clearing the McBSP XCCR and RCCR register thus causing that DMA is not working with OMAP McBSP DAI driver.

As now there is commit 3127f8f8595a064b3f1a1837fea2177902589ac3 in mainline writing those registers, we must initialize them here since otherwise DMA is not working with McBSP DAI driver in any OMAP3 or 2430 based board.

Signature · 1 line
Jarkko
#1 lore raw

PATCH 1/1 ASoC: OMAP: Initialize XCCR and RCCR registers in McBSP DAI driver

From: ext Lopez Cruz, Misael <[email protected]>

This patch explicitly initializes McBSP Transmit Configuration Control Register (XCCR) and Receive Configuration Control Register (RCCR) to their reset values. Reset values are 26 ns of DX delay and Transmit DMA disabled for XCCR register; receive full cycle mode enabled and Receive DMA disabled for RCCR register.

This patch requires a counterpart in OMAP McBSP driver before to apply it. The required changes in McBSP were sent and approved in linux-omap mailing list and patch is going upstream (commit 3127f8f8595a064b3f1a1837fea2177902589ac3 from linux-omap-2.6 tree).

[ [email protected]: Commit id for counterpart patch corrected ]
---
 sound/soc/omap/omap-mcbsp.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
sound/soc/omap/omap-mcbsp.c +4 -0
index ec5e18a..05dd5ab 100644
@@ -302,6 +302,10 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
 	regs->spcr1	|= RINTM(3);
 	regs->rcr2	|= RFIG;
 	regs->xcr2	|= XFIG;
+	if (cpu_is_omap2430() || cpu_is_omap34xx()) {
+		regs->xccr = DXENDLY(1) | XDMAEN;
+		regs->rccr = RFULL_CYCLE | RDMAEN;
+	}
 
 	switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
 	case SND_SOC_DAIFMT_I2S:
Signature · 1 line
1.5.6.5
#2 lore raw
Quoted 5 lines · Jarkko Nikula

This patch requires a counterpart in OMAP McBSP driver before to apply it. The required changes in McBSP were sent and approved in linux-omap mailing list and patch is going upstream (commit 3127f8f8595a064b3f1a1837fea2177902589ac3 from linux-omap-2.6 tree).

That is now in Linus' tree so applied, thanks. I've corrected Misael's name since it had had the Nokia 'ext' added to it - might be worth checking that when using git am.

#3 lore raw
Quoted 11 lines · On Thu, 29 Jan 2009 14:23:54 +0100 ext Mark Brown <[email protected]> wrote:
Quoted 5 lines · Jarkko Nikula

This patch requires a counterpart in OMAP McBSP driver before to apply it. The required changes in McBSP were sent and approved in linux-omap mailing list and patch is going upstream (commit 3127f8f8595a064b3f1a1837fea2177902589ac3 from linux-omap-2.6 tree).

That is now in Linus' tree so applied, thanks. I've corrected Misael's name since it had had the Nokia 'ext' added to it - might be worth checking that when using git am.

Oops, thanks for removing the ext part. I forgot to remove that usual prefix added by our mail server :-)

Jarkko