From: Peter Ujfalusi <peter.ujfalusi@ti.com> To: Mark Brown <broonie@opensource.wolfsonmicro.com>, Liam Girdwood <lrg@ti.com>, Tony Lindgren <tony@atomide.com> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>, alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree-discuss@lists.ozlabs.org, Benoit Cousson <b-cousson@ti.com> Subject: [PATCH v2 7/9] ASoC: omap-mcbsp: Remove cpu_is_omap* checks from the code Date: Mon, 13 Aug 2012 17:22:46 +0300 [thread overview] Message-ID: <1344867768-26335-8-git-send-email-peter.ujfalusi@ti.com> (raw) In-Reply-To: <1344867768-26335-1-git-send-email-peter.ujfalusi@ti.com> 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: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> --- sound/soc/omap/omap-mcbsp.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 5061594..b9770ee 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -398,12 +398,14 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, /* Generic McBSP register settings */ regs->spcr2 |= XINTM(3) | FREE; regs->spcr1 |= RINTM(3); - /* RFIG and XFIG are not defined in 34xx */ - if (!cpu_is_omap34xx() && !cpu_is_omap44xx()) { + /* RFIG and XFIG are not defined in 2430 and on OMAP3+ */ + if (!mcbsp->pdata->has_ccr) { regs->rcr2 |= RFIG; 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->rccr = RFULL_CYCLE | RDMAEN | RDISABLE; } -- 1.7.8.6
WARNING: multiple messages have this Message-ID (diff)
From: peter.ujfalusi@ti.com (Peter Ujfalusi) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 7/9] ASoC: omap-mcbsp: Remove cpu_is_omap* checks from the code Date: Mon, 13 Aug 2012 17:22:46 +0300 [thread overview] Message-ID: <1344867768-26335-8-git-send-email-peter.ujfalusi@ti.com> (raw) In-Reply-To: <1344867768-26335-1-git-send-email-peter.ujfalusi@ti.com> 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: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> --- sound/soc/omap/omap-mcbsp.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 5061594..b9770ee 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -398,12 +398,14 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, /* Generic McBSP register settings */ regs->spcr2 |= XINTM(3) | FREE; regs->spcr1 |= RINTM(3); - /* RFIG and XFIG are not defined in 34xx */ - if (!cpu_is_omap34xx() && !cpu_is_omap44xx()) { + /* RFIG and XFIG are not defined in 2430 and on OMAP3+ */ + if (!mcbsp->pdata->has_ccr) { regs->rcr2 |= RFIG; 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->rccr = RFULL_CYCLE | RDMAEN | RDISABLE; } -- 1.7.8.6
next prev parent reply other threads:[~2012-08-13 14:22 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-08-13 14:22 [PATCH v2 0/9] ARM/ASoC: OMAP McBSP device tree support Peter Ujfalusi 2012-08-13 14:22 ` Peter Ujfalusi 2012-08-13 14:22 ` [PATCH v2 1/9] ARM/ASoC: omap-mcbsp: Move OMAP2+ clock parenting code to ASoC driver Peter Ujfalusi 2012-08-13 14:22 ` Peter Ujfalusi 2012-08-13 15:35 ` Russell King - ARM Linux 2012-08-13 15:35 ` Russell King - ARM Linux 2012-08-14 6:14 ` Peter Ujfalusi 2012-08-14 6:14 ` Peter Ujfalusi 2012-08-13 14:22 ` [PATCH v2 2/9] ARM: OMAP: mcbsp: Enable FIFO use for OMAP2430 Peter Ujfalusi 2012-08-13 14:22 ` Peter Ujfalusi 2012-08-13 14:22 ` [PATCH v2 3/9] ARM: OMAP: board-am3517evm: Configure McBSP1 CLKR/FSR signal source Peter Ujfalusi 2012-08-13 14:22 ` Peter Ujfalusi 2012-08-13 14:22 ` [PATCH v2 4/9] ASoC: am3517evm: Do not configure McBSP1 CLKR/FSR signal muxing Peter Ujfalusi 2012-08-13 14:22 ` Peter Ujfalusi 2012-08-13 14:22 ` [PATCH v2 5/9] ARM/ASoC: omap-mcbsp: Remove CLKR/FSR mux configuration code Peter Ujfalusi 2012-08-13 14:22 ` Peter Ujfalusi 2012-08-13 14:22 ` [PATCH v2 6/9] ASoC: omap-mcbsp: Remove unused defines Peter Ujfalusi 2012-08-13 14:22 ` Peter Ujfalusi 2012-08-13 14:22 ` Peter Ujfalusi [this message] 2012-08-13 14:22 ` [PATCH v2 7/9] ASoC: omap-mcbsp: Remove cpu_is_omap* checks from the code Peter Ujfalusi 2012-08-13 14:22 ` [PATCH v2 8/9] ARM: OMAP2+: McBSP: Do not create legacy devices when booting with DT data Peter Ujfalusi 2012-08-13 14:22 ` Peter Ujfalusi 2012-08-13 14:22 ` [PATCH v2 9/9] ASoC: omap-mcbsp: Add device tree bindings Peter Ujfalusi 2012-08-13 14:22 ` Peter Ujfalusi
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1344867768-26335-8-git-send-email-peter.ujfalusi@ti.com \ --to=peter.ujfalusi@ti.com \ --cc=alsa-devel@alsa-project.org \ --cc=b-cousson@ti.com \ --cc=broonie@opensource.wolfsonmicro.com \ --cc=devicetree-discuss@lists.ozlabs.org \ --cc=jarkko.nikula@bitmer.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=lrg@ti.com \ --cc=tony@atomide.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.