Skip to content

Commit

Permalink
ASoC: OMAP: mcbsp fixes for enabling ARM multiplatform support
Browse files Browse the repository at this point in the history
We cannot include any plat or mach headers for the multiplatform
support.

Fix the issue by defining local mcbsp_omap1().

cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
cc: Liam Girdwood <lrg@ti.com>
cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
cc: Jaroslav Kysela <perex@perex.cz>
cc: Takashi Iwai <tiwai@suse.de>
cc: alsa-devel@alsa-project.org
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Tony Lindgren committed Nov 30, 2012
1 parent 0a779ab commit 6300ebe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 1 addition & 3 deletions sound/soc/omap/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

#include <linux/platform_data/asoc-ti-mcbsp.h>

#include <plat/cpu.h>

#include "mcbsp.h"

static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
Expand Down Expand Up @@ -612,7 +610,7 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp)
* system will refuse to enter idle if the CLKS pin source is not reset
* back to internal source.
*/
if (!cpu_class_is_omap1())
if (!mcbsp_omap1())
omap2_mcbsp_set_clks_src(mcbsp, MCBSP_CLKS_PRCM_SRC);

spin_lock(&mcbsp->lock);
Expand Down
6 changes: 6 additions & 0 deletions sound/soc/omap/mcbsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@

#include "omap-pcm.h"

#ifdef CONFIG_ARCH_OMAP1
#define mcbsp_omap1() 1
#else
#define mcbsp_omap1() 0
#endif

/* McBSP register numbers. Register address offset = num * reg_step */
enum {
/* Common registers */
Expand Down
5 changes: 2 additions & 3 deletions sound/soc/omap/omap-mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <sound/initval.h>
#include <sound/soc.h>

#include <plat/cpu.h>
#include <linux/platform_data/asoc-ti-mcbsp.h>
#include "mcbsp.h"
#include "omap-mcbsp.h"
Expand Down Expand Up @@ -512,15 +511,15 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
regs->srgr2 |= CLKSM;
break;
case OMAP_MCBSP_SYSCLK_CLKS_FCLK:
if (cpu_class_is_omap1()) {
if (mcbsp_omap1()) {
err = -EINVAL;
break;
}
err = omap2_mcbsp_set_clks_src(mcbsp,
MCBSP_CLKS_PRCM_SRC);
break;
case OMAP_MCBSP_SYSCLK_CLKS_EXT:
if (cpu_class_is_omap1()) {
if (mcbsp_omap1()) {
err = 0;
break;
}
Expand Down

0 comments on commit 6300ebe

Please sign in to comment.