diff options
author | Robert Marklund <robert.marklund@stericsson.com> | 2011-06-08 14:27:52 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2011-12-06 10:59:36 +0100 |
commit | 89f90bed14cf26e10e84ba0991ecd37f17ce596c (patch) | |
tree | 33a47ef55438ef2f0ee921447618d279cbd6874d /sound/soc | |
parent | 0f060b46e727ee98599ed5d78e37c75f25e1a31d (diff) |
ux500-ASoC: Change to support ux500 soc:s in build
Change to support ux500 soc:s
in the same build.
ST-Ericsson Linux next: 342252
ST-Ericsson ID: 342253
ST-Ericsson FOSS-OUT ID: Trivial
Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
Change-Id: I276df2266288c0ae95a7ad8d41bdcdce6cfde2bc
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24727
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Reviewed-by: Ola LILJA2 <ola.o.lilja@stericsson.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/ux500/Makefile | 18 | ||||
-rw-r--r-- | sound/soc/ux500/u5500.c | 4 | ||||
-rw-r--r-- | sound/soc/ux500/u8500.c | 4 | ||||
-rw-r--r-- | sound/soc/ux500/ux500_msp_dai.c | 15 | ||||
-rw-r--r-- | sound/soc/ux500/ux500_msp_dai.h | 7 |
5 files changed, 27 insertions, 21 deletions
diff --git a/sound/soc/ux500/Makefile b/sound/soc/ux500/Makefile index 333f5f27ef0..255c0ecefdb 100644 --- a/sound/soc/ux500/Makefile +++ b/sound/soc/ux500/Makefile @@ -10,12 +10,12 @@ CFLAGS_ux500_cg29xx.o := -DDEBUG endif ifdef CONFIG_SND_SOC_UX500_AB3550 -snd-soc-ux500-AB3550-objs := ux500_ab3550.o +snd-soc-ux500-ab3550-objs := ux500_ab3550.o obj-$(CONFIG_SND_SOC_UX500_AB3550) += ux500_ab3550.o endif ifdef CONFIG_SND_SOC_UX500_AB5500 -snd-soc-ux500-AB5500-objs := ux500_ab5500.o +snd-soc-ux500-ab5500-objs := ux500_ab5500.o obj-$(CONFIG_SND_SOC_UX500_AB5500) += ux500_ab5500.o endif @@ -34,18 +34,14 @@ snd-soc-ux500-cg29xx-objs := ux500_cg29xx.o obj-$(CONFIG_SND_SOC_UX500_CG29XX) += ux500_cg29xx.o endif +snd-soc-ux500-objs := ux500_pcm.o ux500_msp_dai.o + ifdef CONFIG_UX500_SOC_DB8500 -CFLAGS_ux500_msp_dai.o += -DSTE_PLATFORM_U8500 -CFLAGS_ux500_pcm.o += -DSTE_PLATFORM_U8500 -snd-soc-u8500-objs := ux500_pcm.o ux500_msp_dai.o u8500.o -obj-$(CONFIG_UX500_SOC_DB8500) += snd-soc-u8500.o +snd-soc-ux500-objs += u8500.o endif ifdef CONFIG_UX500_SOC_DB5500 -CFLAGS_ux500_msp_dai.o += -DSTE_PLATFORM_U5500 -CFLAGS_ux500_pcm.o += -DSTE_PLATFORM_U5500 -snd-soc-u5500-objs := ux500_pcm.o ux500_msp_dai.o u5500.o -obj-$(CONFIG_UX500_SOC_DB5500) += snd-soc-u5500.o +snd-soc-ux500-objs += u5500.o endif - +obj-$(CONFIG_UX500_SOC_DBX500) += snd-soc-ux500.o diff --git a/sound/soc/ux500/u5500.c b/sound/soc/ux500/u5500.c index 1993f5dfe0c..23355baa257 100644 --- a/sound/soc/ux500/u5500.c +++ b/sound/soc/ux500/u5500.c @@ -15,6 +15,7 @@ #include <linux/spi/spi.h> #include <sound/soc.h> #include <sound/initval.h> +#include <asm/mach-types.h> #include "ux500_pcm.h" #include "ux500_msp_dai.h" @@ -86,6 +87,9 @@ static int __init u5500_soc_init(void) pr_debug("%s: Enter.\n", __func__); + if (!machine_is_u5500()) + return 0; + platform_device_register(&ux500_pcm); u5500_platform_dev = platform_device_alloc("soc-audio", -1); diff --git a/sound/soc/ux500/u8500.c b/sound/soc/ux500/u8500.c index a0ced866def..59324c878e4 100644 --- a/sound/soc/ux500/u8500.c +++ b/sound/soc/ux500/u8500.c @@ -13,6 +13,7 @@ #include <linux/io.h> #include <sound/soc.h> +#include <asm/mach-types.h> #include "ux500_pcm.h" #include "ux500_msp_dai.h" @@ -154,6 +155,9 @@ static int __init u8500_soc_init(void) pr_debug("%s: Enter.\n", __func__); + if (machine_is_u5500()) + return 0; + #ifdef CONFIG_SND_SOC_UX500_AV8100 pr_debug("%s: Register device to generate a probe for AV8100 codec.\n", __func__); diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c index b1fdfa779f2..354a0edb8bf 100644 --- a/sound/soc/ux500/ux500_msp_dai.c +++ b/sound/soc/ux500/ux500_msp_dai.c @@ -18,6 +18,7 @@ #include <mach/hardware.h> #include <mach/msp.h> #include <linux/i2s/i2s.h> +#include <asm/mach-types.h> #include <sound/soc.h> #include <sound/soc-dai.h> @@ -36,7 +37,7 @@ static struct ux500_platform_drvdata platform_drvdata[UX500_NBR_OF_DAI] = { .capture_active = false, .configured = 0, .data_delay = MSP_DELAY_0, - .master_clk = UX500_MSP_INTERNAL_CLOCK_FREQ, + .master_clk = UX500_MSP_U8500_INTERNAL_CLOCK_FREQ, }, { .i2s = NULL, @@ -49,7 +50,7 @@ static struct ux500_platform_drvdata platform_drvdata[UX500_NBR_OF_DAI] = { .capture_active = false, .configured = 0, .data_delay = MSP_DELAY_0, - .master_clk = UX500_MSP_INTERNAL_CLOCK_FREQ, + .master_clk = UX500_MSP_U8500_INTERNAL_CLOCK_FREQ, }, { .i2s = NULL, @@ -62,7 +63,7 @@ static struct ux500_platform_drvdata platform_drvdata[UX500_NBR_OF_DAI] = { .capture_active = false, .configured = 0, .data_delay = MSP_DELAY_0, - .master_clk = UX500_MSP_INTERNAL_CLOCK_FREQ, + .master_clk = UX500_MSP_U8500_INTERNAL_CLOCK_FREQ, }, { .i2s = NULL, @@ -75,7 +76,7 @@ static struct ux500_platform_drvdata platform_drvdata[UX500_NBR_OF_DAI] = { .capture_active = false, .configured = 0, .data_delay = MSP_DELAY_0, - .master_clk = UX500_MSP_INTERNAL_CLOCK_FREQ, + .master_clk = UX500_MSP_U8500_INTERNAL_CLOCK_FREQ, }, }; @@ -456,7 +457,11 @@ static void ux500_msp_dai_compile_msp_config(struct snd_pcm_substream *substream memset(msp_config, 0, sizeof(*msp_config)); - msp_config->input_clock_freq = private->master_clk; + if (machine_is_u5500()) + msp_config->input_clock_freq = UX500_MSP_U5500_INTERNAL_CLOCK_FREQ; + else + msp_config->input_clock_freq = private->master_clk; + msp_config->tx_fifo_config = TX_FIFO_ENABLE; msp_config->rx_fifo_config = RX_FIFO_ENABLE; msp_config->spi_clk_mode = SPI_CLK_MODE_NORMAL; diff --git a/sound/soc/ux500/ux500_msp_dai.h b/sound/soc/ux500/ux500_msp_dai.h index a26159bf174..36aaa386c6a 100644 --- a/sound/soc/ux500/ux500_msp_dai.h +++ b/sound/soc/ux500/ux500_msp_dai.h @@ -35,11 +35,8 @@ #define FRAME_PER_8_SLOTS 138 #define FRAME_PER_16_SLOTS 277 -#ifdef STE_PLATFORM_U5500 -#define UX500_MSP_INTERNAL_CLOCK_FREQ 13000000 -#else -#define UX500_MSP_INTERNAL_CLOCK_FREQ 40000000 -#endif +#define UX500_MSP_U5500_INTERNAL_CLOCK_FREQ 13000000 +#define UX500_MSP_U8500_INTERNAL_CLOCK_FREQ 40000000 #define UX500_MSP_MIN_CHANNELS 1 #define UX500_MSP_MAX_CHANNELS 8 |