ASoC: OMAP: mcbsp fixes for enabling ARM multiplatform support
authorTony Lindgren <tony@atomide.com>
Wed, 21 Nov 2012 17:42:25 +0000 (09:42 -0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 27 Nov 2012 19:42:19 +0000 (19:42 +0000)
We cannot include any plat or mach headers for the multiplatform
support.

Fix the issue by defining local mcbsp_omap1().

Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/omap/mcbsp.c
sound/soc/omap/mcbsp.h
sound/soc/omap/omap-mcbsp.c

index afb8d4f1bedfac70eb98492ce5b4c023bb9d0752..a9a243860428d5c49fce866e1c38f1b2dd82ea5a 100644 (file)
@@ -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)
@@ -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);
index 49a67259ce5a1d115de8bce006e2d6d99b48a633..a89791c239a5d0b654d121501a8353a6ac6ec4a8 100644 (file)
 
 #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 */
index a6ee157478593f1e5eb338e51597df176308a953..09167609c93e99521d8bf47a37b692c77e13c128 100644 (file)
@@ -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"
@@ -512,7 +511,7 @@ 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;
                }
@@ -520,7 +519,7 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
                                               MCBSP_CLKS_PRCM_SRC);
                break;
        case OMAP_MCBSP_SYSCLK_CLKS_EXT:
-               if (cpu_class_is_omap1()) {
+               if (mcbsp_omap1()) {
                        err = 0;
                        break;
                }