diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-04-22 16:46:36 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-23 07:18:44 -0400 |
commit | 0aa2a15a7b5ca861b02379a7dcb2d7bf427c62cc (patch) | |
tree | 9accc68ec3c4adcb83561168c3fc2c1babb9f780 | |
parent | 218e18a3728507ee82ed2eb10c789671a00e34bd (diff) |
ASoC: jz4740: Improve build test coverage
Allow the jz4740 audio drivers to be build when CONFIG_COMPILE_TEST is selected.
This should improve the build test coverage. There is one small piece of
platform dependent code in the jz4740-i2s driver. It uses the DMA request type
constants which are defined in a platform specific header. We can solve this by
moving them from the platform specific header to the I2S driver.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | arch/mips/include/asm/mach-jz4740/dma.h | 2 | ||||
-rw-r--r-- | sound/soc/jz4740/Kconfig | 11 | ||||
-rw-r--r-- | sound/soc/jz4740/jz4740-i2s.c | 5 |
3 files changed, 11 insertions, 7 deletions
diff --git a/arch/mips/include/asm/mach-jz4740/dma.h b/arch/mips/include/asm/mach-jz4740/dma.h index 509cd5828044..14ecc5313d2d 100644 --- a/arch/mips/include/asm/mach-jz4740/dma.h +++ b/arch/mips/include/asm/mach-jz4740/dma.h | |||
@@ -22,8 +22,6 @@ enum jz4740_dma_request_type { | |||
22 | JZ4740_DMA_TYPE_UART_RECEIVE = 21, | 22 | JZ4740_DMA_TYPE_UART_RECEIVE = 21, |
23 | JZ4740_DMA_TYPE_SPI_TRANSMIT = 22, | 23 | JZ4740_DMA_TYPE_SPI_TRANSMIT = 22, |
24 | JZ4740_DMA_TYPE_SPI_RECEIVE = 23, | 24 | JZ4740_DMA_TYPE_SPI_RECEIVE = 23, |
25 | JZ4740_DMA_TYPE_AIC_TRANSMIT = 24, | ||
26 | JZ4740_DMA_TYPE_AIC_RECEIVE = 25, | ||
27 | JZ4740_DMA_TYPE_MMC_TRANSMIT = 26, | 25 | JZ4740_DMA_TYPE_MMC_TRANSMIT = 26, |
28 | JZ4740_DMA_TYPE_MMC_RECEIVE = 27, | 26 | JZ4740_DMA_TYPE_MMC_RECEIVE = 27, |
29 | JZ4740_DMA_TYPE_TCU = 28, | 27 | JZ4740_DMA_TYPE_TCU = 28, |
diff --git a/sound/soc/jz4740/Kconfig b/sound/soc/jz4740/Kconfig index 29f76af5d963..1a354a6b6e87 100644 --- a/sound/soc/jz4740/Kconfig +++ b/sound/soc/jz4740/Kconfig | |||
@@ -1,24 +1,29 @@ | |||
1 | config SND_JZ4740_SOC | 1 | config SND_JZ4740_SOC |
2 | tristate "SoC Audio for Ingenic JZ4740 SoC" | 2 | tristate "SoC Audio for Ingenic JZ4740 SoC" |
3 | depends on MACH_JZ4740 && SND_SOC | 3 | depends on MACH_JZ4740 || COMPILE_TEST |
4 | select SND_SOC_GENERIC_DMAENGINE_PCM | 4 | select SND_SOC_GENERIC_DMAENGINE_PCM |
5 | help | 5 | help |
6 | Say Y or M if you want to add support for codecs attached to | 6 | Say Y or M if you want to add support for codecs attached to |
7 | the JZ4740 I2S interface. You will also need to select the audio | 7 | the JZ4740 I2S interface. You will also need to select the audio |
8 | interfaces to support below. | 8 | interfaces to support below. |
9 | 9 | ||
10 | if SND_JZ4740_SOC | ||
11 | |||
10 | config SND_JZ4740_SOC_I2S | 12 | config SND_JZ4740_SOC_I2S |
11 | depends on SND_JZ4740_SOC | ||
12 | tristate "SoC Audio (I2S protocol) for Ingenic JZ4740 SoC" | 13 | tristate "SoC Audio (I2S protocol) for Ingenic JZ4740 SoC" |
14 | depends on HAS_IOMEM | ||
13 | help | 15 | help |
14 | Say Y if you want to use I2S protocol and I2S codec on Ingenic JZ4740 | 16 | Say Y if you want to use I2S protocol and I2S codec on Ingenic JZ4740 |
15 | based boards. | 17 | based boards. |
16 | 18 | ||
17 | config SND_JZ4740_SOC_QI_LB60 | 19 | config SND_JZ4740_SOC_QI_LB60 |
18 | tristate "SoC Audio support for Qi LB60" | 20 | tristate "SoC Audio support for Qi LB60" |
19 | depends on SND_JZ4740_SOC && JZ4740_QI_LB60 | 21 | depends on HAS_IOMEM |
22 | depends on JZ4740_QI_LB60 || COMPILE_TEST | ||
20 | select SND_JZ4740_SOC_I2S | 23 | select SND_JZ4740_SOC_I2S |
21 | select SND_SOC_JZ4740_CODEC | 24 | select SND_SOC_JZ4740_CODEC |
22 | help | 25 | help |
23 | Say Y if you want to add support for ASoC audio on the Qi LB60 board | 26 | Say Y if you want to add support for ASoC audio on the Qi LB60 board |
24 | a.k.a Qi Ben NanoNote. | 27 | a.k.a Qi Ben NanoNote. |
28 | |||
29 | endif | ||
diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c index 8f220009e0f6..3f9c3a9ae36f 100644 --- a/sound/soc/jz4740/jz4740-i2s.c +++ b/sound/soc/jz4740/jz4740-i2s.c | |||
@@ -31,10 +31,11 @@ | |||
31 | #include <sound/initval.h> | 31 | #include <sound/initval.h> |
32 | #include <sound/dmaengine_pcm.h> | 32 | #include <sound/dmaengine_pcm.h> |
33 | 33 | ||
34 | #include <asm/mach-jz4740/dma.h> | ||
35 | |||
36 | #include "jz4740-i2s.h" | 34 | #include "jz4740-i2s.h" |
37 | 35 | ||
36 | #define JZ4740_DMA_TYPE_AIC_TRANSMIT 24 | ||
37 | #define JZ4740_DMA_TYPE_AIC_RECEIVE 25 | ||
38 | |||
38 | #define JZ_REG_AIC_CONF 0x00 | 39 | #define JZ_REG_AIC_CONF 0x00 |
39 | #define JZ_REG_AIC_CTRL 0x04 | 40 | #define JZ_REG_AIC_CTRL 0x04 |
40 | #define JZ_REG_AIC_I2S_FMT 0x10 | 41 | #define JZ_REG_AIC_I2S_FMT 0x10 |