Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc26df52 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown
Browse files

ASoC: omap-mcbsp: Remove cpu_is_omap* checks from the code



We can use the has_ccr flag to replace the cpu_is_omap* checks.
This provides future proof implementation and we do not need to update the
code if new OMAP revision starts to use the McBSP driver.

Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: default avatarJarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 8d3c0909
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -398,12 +398,14 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
	/* Generic McBSP register settings */
	/* Generic McBSP register settings */
	regs->spcr2	|= XINTM(3) | FREE;
	regs->spcr2	|= XINTM(3) | FREE;
	regs->spcr1	|= RINTM(3);
	regs->spcr1	|= RINTM(3);
	/* RFIG and XFIG are not defined in 34xx */
	/* RFIG and XFIG are not defined in 2430 and on OMAP3+ */
	if (!cpu_is_omap34xx() && !cpu_is_omap44xx()) {
	if (!mcbsp->pdata->has_ccr) {
		regs->rcr2	|= RFIG;
		regs->rcr2	|= RFIG;
		regs->xcr2	|= XFIG;
		regs->xcr2	|= XFIG;
	}
	}
	if (cpu_is_omap2430() || cpu_is_omap34xx() || cpu_is_omap44xx()) {

	/* Configure XCCR/RCCR only for revisions which have ccr registers */
	if (mcbsp->pdata->has_ccr) {
		regs->xccr = DXENDLY(1) | XDMAEN | XDISABLE;
		regs->xccr = DXENDLY(1) | XDMAEN | XDISABLE;
		regs->rccr = RFULL_CYCLE | RDMAEN | RDISABLE;
		regs->rccr = RFULL_CYCLE | RDMAEN | RDISABLE;
	}
	}