Commit 6300ebe9 authored by Tony Lindgren's avatar Tony Lindgren

ASoC: OMAP: mcbsp fixes for enabling ARM multiplatform support

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: default avatarJarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 0a779abe
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include <linux/platform_data/asoc-ti-mcbsp.h> #include <linux/platform_data/asoc-ti-mcbsp.h>
#include <plat/cpu.h>
#include "mcbsp.h" #include "mcbsp.h"
static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
...@@ -612,7 +610,7 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp) ...@@ -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 * system will refuse to enter idle if the CLKS pin source is not reset
* back to internal source. * back to internal source.
*/ */
if (!cpu_class_is_omap1()) if (!mcbsp_omap1())
omap2_mcbsp_set_clks_src(mcbsp, MCBSP_CLKS_PRCM_SRC); omap2_mcbsp_set_clks_src(mcbsp, MCBSP_CLKS_PRCM_SRC);
spin_lock(&mcbsp->lock); spin_lock(&mcbsp->lock);
......
...@@ -26,6 +26,12 @@ ...@@ -26,6 +26,12 @@
#include "omap-pcm.h" #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 */ /* McBSP register numbers. Register address offset = num * reg_step */
enum { enum {
/* Common registers */ /* Common registers */
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <sound/initval.h> #include <sound/initval.h>
#include <sound/soc.h> #include <sound/soc.h>
#include <plat/cpu.h>
#include <linux/platform_data/asoc-ti-mcbsp.h> #include <linux/platform_data/asoc-ti-mcbsp.h>
#include "mcbsp.h" #include "mcbsp.h"
#include "omap-mcbsp.h" #include "omap-mcbsp.h"
...@@ -512,7 +511,7 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai, ...@@ -512,7 +511,7 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
regs->srgr2 |= CLKSM; regs->srgr2 |= CLKSM;
break; break;
case OMAP_MCBSP_SYSCLK_CLKS_FCLK: case OMAP_MCBSP_SYSCLK_CLKS_FCLK:
if (cpu_class_is_omap1()) { if (mcbsp_omap1()) {
err = -EINVAL; err = -EINVAL;
break; break;
} }
...@@ -520,7 +519,7 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai, ...@@ -520,7 +519,7 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
MCBSP_CLKS_PRCM_SRC); MCBSP_CLKS_PRCM_SRC);
break; break;
case OMAP_MCBSP_SYSCLK_CLKS_EXT: case OMAP_MCBSP_SYSCLK_CLKS_EXT:
if (cpu_class_is_omap1()) { if (mcbsp_omap1()) {
err = 0; err = 0;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment